A collection of my Technical Resource documentation.
Latest Tech Articles
Setting up the Server:
The first step should be to create your Project in your Code Versioning software (Eg Git) You should create a project to store Your configuration and changes for easy restoration.
Create a docker-compose.yml in Your project with the following content before starting the container. Adjust the jenkins volume if You wish to store Your Jenkins config in another directory.
version: '3.7' services: jenkins: image: 'jenkins/jenkins:lts' ports: - '8080:8080' - '8443:8443' - '50000:50000' volumes: - '/data/jenkins:/var/jenkins_home' container_name: jenkins
Now create the container:
sudo docker-compose up -d
Wait until the container has build and access your Jenkins server via HTTP:
This will promt You to get the admin password written to the container, You can get this simply by running the below command:
sudo docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
Copy the contents of this file and enter this on your Jenkins web UI
Proceed through the setup Wizard, You should select Your code versioning Software (eg Gitlab) to allow it to trigger builds as well as any other packages You deem appropriate.
Once the setup has completed – Commit the files into your Code Versioning software and You can start building a Project (This will be covered in a future guide)!
This short guide will show you how to install Helm on your Ubuntu machine and Tiller on Your Kubernetes cluster to install packages via Helm.
The below commands should be run on your Ubuntu machine from which you will be installing Helm packages:
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh chmod +x install-helm.sh sudo ./install-helm.sh
Now run the below to install tiller service account :
kubectl -n kube-system create serviceaccount tiller
By default, only the IAM user who created the EKS Cluster will have access – Follow the below instructions to provide other AWS users access to the Cluster.
Getting the ARN for the new user
Login to the AWS Console and open the IAM page and find the user who you wish to provide access to the EKS cluster.
When opening the User’s page you will see their IAM ARN at the top of the page – Make a note of this, eg:
When deploying your EKS cluster via this guide – You will have created a file in your Code Versioning software called “aws-auth-cm.yaml”. This is the file that determines which users have access to the EKS Cluster.
Open this file and add the ARN copied earlier under “mapUsers”. Eg:
- userarn: arn:aws:iam::123456789012:user/example.user username: example.user groups: - system:kubelet-api-admin - system:masters
Save this file into your Code Versioning and apply the file to your EKS Cluster:
kubectl apply -f aws-auth-cm.yaml