The following steps describe a public setup using HTTPS with a domain name.
Prerequisites
These prerequisites require access to AWS with administrative privileges as they involve IAM work.
-
Follow the steps from AWS Load Balancer Controller to install the AWS Load Balancer controller in the EKS cluster.
-
Create a certificate in AWS Certificate Manager for the required domain name.
Installing CloudBees CI on modern cloud platforms on EKS
These steps require access to the EKS cluster. |
The If you do not want to specify a hostname, you must configure the following system properties before you attempt the installation:
|
-
Add the CloudBees Helm chart repository as follows:
helm repo add cloudbees https://charts.cloudbees.com/public/cloudbees helm repo update
-
Before initiating an installation, type the following commands to create a namespace:
kubectl create namespace cloudbees-core kubectl config set-context $(kubectl config current-context) --namespace=cloudbees-core
Then proceed with the installation.
-
Create a file named
values.yaml
with the following content.OperationsCenter: HostName: cloudbees-core.example.com (1) Protocol: https (2) Platform: eks Ingress: Class: alb Annotations: alb.ingress.kubernetes.io/scheme: internet-facing (3)
1 Replace cloudbees-core.example.com
with your domain name.2 Remove to use http
3 Can be omitted in order to use an internal load balancer. Refer to the full list of annotations if more details are needed.
-
Perform the installation.
helm upgrade --install cloudbees-core \ cloudbees/cloudbees-core \ --namespace cloudbees-core \ -f values.yaml
Creating a DNS record
Look up the ALB host name using the following command
kubectl --namespace cloudbees-core get ingress cjoc -o go-template='{{ range .status.loadBalancer.ingress }}{{ .hostname}}{{"\n"}}{{end}}'
This should return something like k8s-cloudbees-aabbccddee-1234567890.<region>.elb.amazonaws.com
.
Create a CNAME (or an alias in route 53) DNS record targeting this name in order to access the CloudBees CI on modern cloud platforms deployment.
Verifying your CloudBees CI installation
The helm status
command displays the status of the CloudBees CI release.
This command is also executed after helm install
and helm upgrade
commands are executed.
The helm status
command displays two areas of information:
-
Current CloudBees CI release
-
Installation notes
helm status cloudbees-core
NAME: cloudbees-core
LAST DEPLOYED: Tue Apr 16 17:44:12 2019
NAMESPACE: cloudbees-core
STATUS: DEPLOYED
REVISION: 1
TEST SUITE: None
NOTES:
1. Once operations center is up and running, get your initial admin user password by running:
kubectl rollout status sts cjoc --namespace cloudbees-core
kubectl exec cjoc-0 --namespace cloudbees-core -- cat /var/jenkins_home/secrets/initialAdminPassword
2. Visit https://cloudbees-core.example.com/cjoc/
3. Sign in with the password from step 1.
Signing in to your CloudBees CI installation
Now that you’ve installed CloudBees CI and operations center, you’ll want to see your system in action.
-
Type the following command to retrieve your administrative user password:
kubectl exec cjoc-0 -- cat /var/jenkins_home/secrets/initialAdminPassword
-
Open a browser to
http://cloudbees-core.example.com/cjoc/
. -
Sign in with the username
admin
and the password you retrieved.
For more information on running CloudBees CI on Kubernetes, see the CloudBees CI on modern cloud platforms administration guide.