Rapid delivery of software is critical to running your applications efficiently in the cloud. Deploying automated software releases through pipelines increases developer productivity and allows you to release features more frequently and with fewer errors. It helps avoid downtime during deployment and automates the complexity of updating applications. Oracle Cloud Infrastructure DevOps provides developers with an end-to-end, continuous deployment experience. Oracle Cloud Infrastructure DevOps services include deployment pipelines to automate your continuous software delivery and deployment process (CD) to Oracle Cloud Infrastructure (OCI) platforms: Oracle Cloud Infrastructure Container Engine Kubernetes, Oracle Functions, and Oracle Cloud Infrastructure compute instances. Oracle Cloud Infrastructure is available to customers migrating workloads on-premises or from other clouds, as well as those developing new applications on OCI. This architecture shows an example of a NodeJS application deployed from a repository using Oracle Cloud Infrastructure (OCI) DevOps services. The application is deployed to an Oracle Cloud Infrastructure Container Engine Kubernetes (OKE) cluster. To streamline the process, we use Terraform for infrastructure automation. The following diagram illustrates this reference architecture.
This schema consists of the following components:RegionAn Oracle Cloud Infrastructure region is a geographically constrained region that contains one or more data centers known as availability domains. Regions are independent of other regions and may be far apart (across countries or even continents).
Virtual Cloud Networks (VCNs) and SubnetsA VCN is a customizable, software-defined network that you set up in an Oracle Cloud Infrastructure region. Like traditional data center networks, VCNs give you complete control over your network environment. A VCN can have multiple non-overlapping CIDR blocks, which you can change after you create the VCN. You can divide a VCN into subnets, which can be scoped to a region or an availability domain. Each subnet contains a series of contiguous addresses that do not overlap with other subnets in the VCN. You can change the size of the subnet after it has been created. Subnets can be public or private.
OCI DevOps projectsAn OCI DevOps project is a logical grouping of resources needed to implement a continuous integration and deployment (CI CD) workload. OCI DevOps resources can be artifacts, deployment pipelines, and environments. OCI DevOps projects make it easy to enable logging, monitoring, and notifications for your OCI DevOps resources.
Build pipelineThe build pipeline gets the commit ID from your feed repository and runs your build instructions with that source. A build pipeline defines a series of stages of the build process: building, testing, and compiling software artifacts, delivering artifacts to OCI repositories, and optionally triggering deployments. You define the process and instructions for the build run in the build specification file.
Build StagesA build stage is a single action that occurs during the run of a build pipeline. The OCI DevOps build pipeline consists of three phases:
Build container: Execute the build specyaml directives to compile, build, and prepare the necessary artifacts.
Upload artifacts: Upload all prepared artifacts, such as Docker images, to be pushed to the configured Oracle Cloud Infrastructure Registry repository.
Trigger deployment: Trigger the OKE of the deployment pipeline to apply the changes to the configuration.
Deployment pipelineA deployment pipeline contains the requirements that need to be met to deliver a set of artifacts into the environment. A pipeline contains stages, which are the building blocks of a pipeline. Pipelines can have stages that run serially or in parallel, so you can control the flow and logic of your software release.
Deployment stagesA stage is a single action that occurs during a pipeline run. The OCI DevOps deployment pipeline consists of only one predefined stage, called Deployment Helm, for deploying Kubernetes applications using the Helm chart. helm chart url and optional valuesThe YAML file is sent to the deployment Helm stage as an OCI DevOps artifact. During execution, the Helm phase takes the Helm chart from the Oracle Cloud Infrastructure Registry and applies it to the configured OKE OCI DevOps environment, optionally providing Valuesyaml file.
DevOps artifactAn OCI DevOps artifact is a reference or pointer to any file, binary, package, manifest, or mirror image that makes up your application. When you create an artifact, you must inform OCI DevOps of the source location of the actual artifact. OCI DevOps supports OCI Container Registry and OCI Artifact Registry Repositories.
Artifact repositoryAn article warehouse is used to create a warehouse that is used to group similar articles. After you create a repository, you can upload artifacts. These artifacts are a collection of text files, binaries, and deployment manifests that will be delivered to the target deployment environment. Each artifact has a name, consisting of its path: version. A path is a string used to organize artifacts.
helmHelm is a package manager for Kubernetes that manages application deployments as a set of Helm charts, allowing you to easily manage individual services and their lifecycles.
Oracle Linux's Helm module installs Helm into a Kubernetes module (cluster).
helm chartKubernetes YAML manifests are combined into a single package that can be deployed to your Kubernetes cluster. The Helm chart contains a template for the Kubernetes YAML manifest file and a valuesYAML file to provide default template values. Use the helm chart to deploy an application or a component of a larger application.
OCI Logs and OCI NotificationsOracle Cloud Infrastructure Logs and Oracle Cloud Infrastructure Notifications store logs related to your deployment. The deployment runtime output and the final result of the deployment are displayed as log entries. OCI Notifications provides visibility into the latest status of deployment projects and their resources, and takes necessary actions.
Deploy the environmentAn environment is a collection of a customer's computing resources in which artifacts are deployed. Environments can be functions, compute virtual machines (VMs) or bare metal instances, or OKE clusters.
Oracle Kubernetes Cluster (OKE): OCI Container Engine is a fully managed, scalable, and highly available service for Kubernetes, which you can use to deploy containerized applications to the cloud.
Compute instances: OCI Compute enables you to provision and manage compute hosts in the cloud. You can launch compute instances that meet your CPU, memory, network bandwidth, and storage resource needs.
Functions: Oracle Functions is a fully managed, multi-tenant, highly scalable, on-demand function-as-a-service (FaaS) platform. It's built on enterprise-grade OCI and powered by the FN Project open-source engine.
This architecture uses OKE clusters as the environment. Environments can be in different OCI regions than the region in which the pipeline is deployed. This allows developers to deploy in multiple OCI regions using the same deployment pipeline.
Use the following suggestions as a starting point. Your needs may differ from the architecture described here. Virtual Cloud Network (VCN).When you create a VCN, determine the number of CIDR blocks you need and the size of each block based on the number of resources you plan to connect to the VCN subnet. Use CIDR blocks within a standard private IP address space.
Once you have created a VCN, you can change, add, and remove its CIDR blocks.
This architecture uses a public VCN to host OKE clusters. You can also use a private VCN. In this case, use a NAT gateway to enable the cluster to be accessible over the public internet.
Compute shapesThis architecture uses an Oracle Linux OS image with an E4 elastic shape to host compute hosts in OKE cluster nodes with minimal resources. If your application requires more memory or cores, you can choose from different shapes.
kubernetes(oke)This architecture is deployed to an OKE cluster as the target endpoint. The worker nodes are deployed on the E4 Oracle Linux OS. This architecture uses three worker nodes in a cluster, but you can create up to 1000 nodes on each cluster.
Container Image RegistryThis schema deploys the registry as a private docker registry for internal use. The docker image is pushed to the registry and pulled from it. You can also use the registry as a public Docker registry, enabling anyone with internet access and knowledge of the appropriate URL to pull images from public repositories in Oracle Cloud. In this schema, the same container registry is also used to store Helm charts.
Artifact RegistryThis architecture creates an artifact for the software and configuration used by the OKE cluster. The schema creates an artifact registry repository for internal use. Software binaries, text, and deployment configurations are uploaded to and from the artifact registry repository.
When deploying this reference architecture, consider the following points. Oracle Cloud Infrastructure DevOps-supported deploymentsDevOps supports deployment to Kubernetes (OKE), compute hosts, and Oracle Functions. This architecture is deployed to the OKE cluster using the helm chart. Consider deploying to other endpoints as needed.
Supported hostsOnly Linux hosts that deploy instance groups to Oracle Cloud Infrastructure compute instances are supported.
productsArtifacts deployed using Oracle Cloud Infrastructure DevOps must reside in the Oracle Cloud Infrastructure artifact registry or container image registry repository.
projectThe best practice is to group each application and all of its microservices into a single project.
Terraform for this reference architecture is available on GitHub. Deploy using the sample stack in Oracle Cloud Infrastructure Explorer:
Tap and enter your tenant and user credentials if you haven't already.
Select the region where you want to deploy the stack.
Follow the on-screen prompts and instructions to create a stack.
Once the stack is created, click the Terraform action and select Plan.
Wait for the job to complete and review the plan.
If you need to make any changes, return to the stack details page, click Edit Stack, and make the necessary changes. Then, run the plan action again.
If you don't need to make any further changes, go back to the stack details page, click the Terraform action, and select Apply.
Deploy using Terraform in GitHub:Visit GitHub.
Clone or repositorate to your local computer.
Follow the instructions in the README documentation.
As an Oracle Premier Partner, Agilewing is redefining the way enterprises experience Oracle Cloud Services. With its streamlined account opening process and best-in-class technical support, Agilewing transforms the complex process of account opening and operation into an easy, intuitive experience. With our one-stop shop, you can quickly get up and running with the full range of Oracle Cloud services, so you can seamlessly integrate into the cloud. Agilewing's AgileCDN service, combined with OCI's cloud-based services, provides a best-in-class global content acceleration solution. A strong network of more than 2,800 global POP nodes and 7,000 direct connection points ensures efficient and stable operation no matter where your business expands to the world. Leveraging the advanced technology of Oracle Cloud, Agilewing is committed to simplifying the process of cloud service building, cloud migration, and business going global. "Our partnership model provides customers with cost-effective solutions that allow them to focus more on their core business while enjoying the high performance and security of Oracle Cloud." Oracle Cloud Service, as a promising field, opens the door to new opportunities for enterprises with its high performance, security, and globally consistent service standards. Through Agilewing's professional services, both individual users and enterprises can easily enter this new era full of technological innovation and high performance. Let Agilewing start exploring Oracle Cloud Services and open the door to a whole new world today.