The Spinnaker continuous delivery platform can be used to perform deployments to
Oracle Cloud Infrastructure.
Here, we have two Spinnaker pipelines called "bake-deploy-oci" and oke.
A Spinnaker pipeline consists of a series of "stages," which are used to do the actual
deployment.
Let's look at our OKE Spinnaker pipeline.
This pipeline is configured to listen for the completion of a Wercker build, which will
then kick off the stages of this pipeline.
This pipeline consists of one stage - the "Deploy" stage, which performs a
deployment to an OKE cluster.
This deployment uses the "wercker-staging-oke" cluster, which has been configured as a Kubernetes
account in Spinnaker.
It’ll deploy two containers pulled from OCIR.
It's configured to use a Load Balancer that was previously created in OKE, also
using Spinnaker.
The "bake-deploy-oci" pipeline deploys an application to an Oracle compute instance.
This pipeline's execution is also triggered by the completion of a Wercker build.
The pipeline consists of two stages: a "bake" stage which will create a custom VM image
in OCI, and a Deploy stage, which will provision a compute instance in OCI that
uses the custom VM image.
Custom Images in OCI can be viewed in the OCI console.
When the Spinnaker pipeline's "bake" stage completes, the new image will be visible here.
We'll now see how making a source edit will trigger a Wercker CI pipeline, followed by
a Spinnaker CD pipeline, resulting in deployment to OCI.
Let's make a small edit to the wercker.yml file for this application, and commit our
changes.
We see that this has triggered a build in Wercker for the commit that we just made.
While that's building, here’s a quick look at the wercker.yml file for the application.
It contains a series of steps that builds and tests the application.
The final step in the build is to perform a docker push to an OCI repository.
Let's return to Spinnaker.
Now, both of our pipelines are running, triggered by the completion of the Wercker build.
In the details of the "oke" pipeline, we can see information about the Kubernetes pods
that are being created.
In our Kubernetes cluster, we can see the new pod, which has been running for the last
30 seconds.
Going back to Spinnaker, we can see that the "oke" pipeline has succeeded.
Let’s go and look at the deployed application.
From the Load Balancer page in Spinnaker, we can find our application's load balancer
and copy its IP address.
Our application has now been deployed to OKE, and we can navigate around.
In Spinnaker, a portion of our "bake-deploy-oci" pipeline has turned green, which means that
it’s partially completed.
The "bake" stage has succeeded, and the "deploy" stage is running.
If we now go to OCI, we’ll see our newly "baked" custom image.
Since the "deploy" stage is running, we can also see a compute instance is being provisioned,
and the image it’s using is the one that was just "baked".
Now our "deploy" stage has completed.
Returning to OCI, we can see the compute instance is now in the "Running" state.
To view our application on this instance, we can go to its public IP address.
Our application is now deployed in an OCI compute instance of an OKE cluster.
Learn more at cloud.oracle.com/containers/pipelines.