Install Spinnaker
By now we have completed our configuration for Spinnaker and the SpinnakerService
manifest located at deploy/spinnaker/basic/spinnakerservice.yml should look like below:
Install Spinnaker Service
Confirm if all the environment variables is set correctly
echo $ACCOUNT_ID
echo $AWS_REGION
echo $SPINNAKER_VERSION
echo $GITHUB_USER
echo $GITHUB_TOKEN
echo $S3_BUCKET
echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY
echo $ECR_REPOSITORY
If you do not see output from the above command for all the Environment Variables, do not proceed to next step
cd ~/environment/spinnaker-operator/
envsubst < deploy/spinnaker/basic/spinnakerservice.yml | kubectl -n spinnaker apply -f -
It will take some time to bring up all the pods, so wait for few minutes..
# Get all the resources created
kubectl get svc,pod -n spinnaker
# Watch the install progress.
kubectl -n spinnaker get spinsvc spinnaker -w
Test the setup on Spinnaker UI
Access Spinakker UI
Grab the load balancer url from the previous step, and load into the browser, you should see the below Spinnaker UI
Create a test application
Click on Create Application
and enter details.
Create a test pipeline
Click on Pipelines
under test-application
and click on Configure a new pipeline
and add the name.
Click on Add Stage
and select Deploy (Manifest)
from the dropdown for Type, select spinnaker-workshop
from the dropdown for Account and put the below yaml into the Manifest text area and click on “Save Changes”.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
In the Spinnaker UI, Go to Pipelines
and click on Start Manual Execution
You will see the pipeline getting triggered and is in progress
After few seconds, the pipleine is successful
Clicking on execution details
you can see the detail of deployment
Go to Clusters
and verify the deployment
You can also go to Cloud9 terminal and verify the deployment
kubectl get deployment nginx-deployment -n spinnaker
kubectl get pods -l app=nginx -n spinnaker
Congratulations! You have successfully installed Spinnaker and created a test pipeline in Spinnaker and deployed the ngnix manifest to EKS cluster.