https://github.com/oracle-quickstart/oci-orm-cicd
Deploy oci infrastructure using Jenkins pipeline
https://github.com/oracle-quickstart/oci-orm-cicd
oracle-led
Last synced: 10 months ago
JSON representation
Deploy oci infrastructure using Jenkins pipeline
- Host: GitHub
- URL: https://github.com/oracle-quickstart/oci-orm-cicd
- Owner: oracle-quickstart
- Created: 2020-05-27T16:14:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-10T13:49:57.000Z (over 5 years ago)
- Last Synced: 2024-12-29T20:15:57.977Z (12 months ago)
- Topics: oracle-led
- Language: HCL
- Size: 56.6 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oci-orm-cicd
## Introduction
This example shows how to use a Jenkinsfile to create and deploy an Oracle Resource Manager stack onto OCI.
## Usage
In order to use this example, you need to have a Jenkins instance running.
### Jenkins configuration
This example requires that Jenkins has access to the OCI CLI. This needs to be installed for the user that runs the Jenkins process.
In a default installation, this will be done by the _Jenkins_ user.
1. `sudo vi /etc/passwd`
2. Change the entry for the Jenkins user from
`/bin/false` to `/bin/bash`.
3. `sudo su jenkins`
4. Install and configure the OCI CLI acoording to following documentation: https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
:white_check_mark: Once this is done, we should be able to invoke the OCI CLI from within Jenkins.
5. Repeat steps 1 & 2, but reset the shell for user `jenkins`back to `/bin/false` . This prevents direct shell login using the Jenkins account.
## Architecture

The ORM stack that Jenkins will create is based upon the Terraform script in the **terraform** folder.
It will create following resources:
* Virtual Cloud Network (10.1.0.0/16)
* Public Subnet (10.1.20.0/24)
* Internet Gateway
* Route table to attach the Internet Gateway to the public subnet
* Compute instance
* SSH public/private key pair that can be found in the terraform state file once the resource stack job is finished