The following repository contains several examples to orchestrate the usage of Bricks for copy/paste purposes on customer migrated infrastructure.
For initial understanding of methodology and framework, refer to the following link
This documentation is still under construction. Stay tunned for more details
-
A small /30 VCN with a single subnet to provision initial bastion server. You can use the quickstart guide as instructed next:
-
Once VCN is created, create a simple compute using latest Oracle Linux Image
- Machine should:
- Have Public IP
- Locate it on root compartment
- Machine should:
-
Run script setup_bastion.sh to set up your development staging environment
-
Clone this repository under path: /home/opc/REPOS/OCIFE
-
Update each corresponding
system.tfvar
file inside each system, accordingly to your need. -
For system specific re-requisites check each individual
README.md
-
In order to provision infrastructure a pre-configured S3 compatibility API setup must be in place
-
CLI pre-configured with pertaining user
The following are some of the important files to be aware of in this project
This bash script installs and pre-configures the entire executor server to properly run terraform and several other utilities
This bash script destroys systems that are passed on as variables to it.
Usage:
./destroyInfra.sh SYSTEM_NAME
Considerations
- Once script has accepted it's workflow, there is no way back and infrastructure will be dropped
- This script can be ported to any continuous integration platform of your choice
- Script contains re-try logic in case of any errors. The amount of retries can be customized by updating variable
retry_attempts
- Script relies on the value of .tfstate stored in bucket
This bash script provisions systems that are passed on as variables to it.
Usage:
./provisionInfra.sh SYSTEM_NAME
Considerations
- Once script has accepted it's workflow, there is no way back and infrastructure will be dropped
- This script can be ported to any continuous integration platform of your choice
- Script contains re-try logic in case of any errors. The amount of retries can be customized by updating variable
retry_attempts
- Script relies on the value of .tfstate stored in bucket
This bash script validates system composition by checking it's integrity and variable composition
Usage:
./validateInfra.sh SYSTEM_NAME
Considerations
- Once script has accepted it's workflow, there is no way back and infrastructure will be dropped
- This script can be ported to any continuous integration platform of your choice
- Script contains re-try logic in case of any errors. The amount of retries can be customized by updating variable
retry_attempts
- Script relies on the value of .tfstate stored in bucket
This bash script sets up the pipeline composition of the repository. This file can be updated to convinience. It's currently adapted to work with this particular repository and based on what's highlighted and pre-configured by script setup_bastion.sh. The content of it is the following:
export TERRAFORM_WORKSPACE='/home/opc/REPOS/OCIFE'
export PROJECT='terraform-oci-cloudbricks-examples'
export SYSTEM=$1
export TERRAFORM_ARTIFACT_WORKSPACE=$TERRAFORM_WORKSPACE/$PROJECT/$SYSTEM
This project is open source. Please submit your contributions by forking this repository and submitting a pull request! Oracle appreciates any contributions that are made by the open source community.
Copyright (c) 2021 Oracle and/or its affiliates.
Licensed under the Universal Permissive License (UPL), Version 1.0.
See LICENSE for more details.