- Docker build
- Simple Kubectl Deploy
- Jenkins Deploy
System Requirement to install this repository are as following:
Conditions | Details | Notes |
---|---|---|
Operating System | Windows Pro, CentOS7.x, Ubuntu20.04 | Docker Desktop see-Devops01 |
Cloud | Azure, Aws, Bare-metal, Rancher, VirtualBox | Kubernetes cluster |
Machine Configuration | vCPU no less than 2 core, Memory no less than 4 GIB, Storage no less than 20 GB, Swap no less than 2GB | Bandwidth no less than 100M |
Core components of this repository: Jenkins, Docker, Rancher
Installing Docker onto a Synology NAS is the normal click click click sort of workflow.
Synology HDD compatibility How to Install XPEnology Tinycore Redpill
The first thing to do is to enable SSH login on Diskstation. To do this, go to the “Control Panel” > “Terminal”
After that you can log in via “SSH”, the specified port and the administrator password (Windows users take Putty or XShell or mRemoteNG).
I log in via Terminal, winSCP or Putty and leave this console open for later. Optionally you can login directly with Windows OpenSSH client: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui
The authenticity of host '[synology.local](0.0.0.0)' can't be established.
ECDSA key fingerprint is SHA256:1234567890abcdef1234567890abcdef1234567890a.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password: ********
[email protected]:~$
I create a new directory called “jenkins” in the Docker directory, as well a a “docker-compose.yml” file.
mkdir -p /volume1/docker/jenkins/
cd /volume1/docker/jenkins
touch docker-compose.yml
mkdir -p data
Docker Compose file contains:
version: '2.0'
services:
jenkins:
restart: always
image: jenkins/jenkins:lts
privileged: true
user: root
ports:
- 8081:8080
container_name: jenkins
volumes:
- ./data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/local/bin/docker:/usr/local/bin/docker
I can also make good use of the console in this step. I start the Jenkins server via Docker Compose.
sudo docker-compose up -d
After that I can call my Jenkins server with the IP of the diskstation and the assigned port from “Step 2”.
Enter the password that we captured from the file at /var/jenkins_home/secrets/initialAdminPassword after installing Jenkins.
I recommend just installing the recommended plugins first up. You can always add or remove plugins later.
Some plugins to install:
- ✓ Git parameter
- ✓ AnsiColor
- ✓ Build with Parameters
- ✓ Github
- ✓ Kubernetes Credentials
- ✓ Environment Script
- ✓ CloudBees Docker Build and Publish
Some plugins to remove (if not needed):
- ✕ SSH Build Agents
- ✕ SSH server + (Mina SSHD API :: Core, Mina SSHD API :: Common)
Enter the container
docker exec -it jenkins /bin/bash
Get the random admin password generated
cat /var/jenkins_home/secrets/initialAdminPassword
How to install Docker engine inside Jenkins Debian container
apt-get update
apt-get install ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
service docker start
docker run hello-world
Some investigations inside the container
docker run busybox ping -c 1 192.203.230.10
docker run busybox nslookup google.com