Giter Site home page Giter Site logo

terraform-oci-cloudbricks-examples's Introduction

OCI Cloud Bricks: Framework Examples

License: UPL Quality gate

Introduction

The following repository contains several examples to orchestrate the usage of Bricks for copy/paste purposes on customer migrated infrastructure.

Getting Started

For initial understanding of methodology and framework, refer to the following link

This documentation is still under construction. Stay tunned for more details

Prerequisites

  • A small /30 VCN with a single subnet to provision initial bastion server. You can use the quickstart guide as instructed next:

    • Go to Hamburger Menu > Networking > Virtual Cloud Networks Image_01
    • Go to Root compartment on the left part of the screen
    • Click on Start VCN Wizard Image_02
    • Select Create VCN with Internet Connectivity and then hit on Start VCN Wizard Image_03
    • Fill the required fields with the following information:
      • VCN Name: Initial_Setup
      • Compartment: root
      • VCN CIDR Block: 192.168.0.0/25
      • Public Subnet CIDR Block: 192.168.0.0/25
      • Private Subnet CIDR Block: 192.168.0.64/26
      • Click on Next Image_04
      • Click on Create Image_05
  • Once VCN is created, create a simple compute using latest Oracle Linux Image

    • Machine should:
      • Have Public IP
      • Locate it on root compartment
  • 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

Important files

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

Contributing

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.

License

Copyright (c) 2021 Oracle and/or its affiliates.

Licensed under the Universal Permissive License (UPL), Version 1.0.

See LICENSE for more details.

terraform-oci-cloudbricks-examples's People

Contributors

djukickosta avatar dralquinta avatar grzegorzwysopal avatar matt-mcl avatar nicolinap avatar timclegg avatar ttscoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

terraform-oci-cloudbricks-examples's Issues

issue on provision and destroy scripts

When executing these two scripts, an error will occur

Executing with terrform version: Terraform v1.0.3 on linux_amd64
/home/opc/REPOS/OCIFE/customer_migrated_infrastructure/customers/machiron/GENERAL_COMPARTMENT_SYSTEM
=================== EXECUTING TERRAFORM =======================
--- Deleting temporal lingering files
./provisionInfra.sh: line 43: ((: k<=: syntax error: operand expected (error token is "<=")
./provisionInfra.sh: line 57: ((: k<=: syntax error: operand expected (error token is "<=")
./provisionInfra.sh: line 72: ((: k<=: syntax error: operand expected (error token is "<=")

lpg peering issue

When using example of network sample, an issue will appear when trying to poll for peered_vcn_display_name

setup_bastion.sh does not install git on Oracle Linux 8

As the /etc/yum.repos.d/wandisco-git.repo reference is fixed to
baseurl=http://opensource.wandisco.com/rhel/7/git/$basearch/

git will not be installed on Oracle Linux 8.

Error message:
[opc@executor ~]$ sudo yum install git
Last metadata expiration check: 0:11:13 ago on Fri 13 May 2022 08:18:14 AM GMT.
Error:
Problem: package git-2.31.1-1.WANdisco.469.x86_64 requires perl-Git = 2.31.1-1.WANdisco.469, but none of the providers can be installed

  • cannot install the best candidate for the job
  • nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-Git-2.31.1-1.WANdisco.469.noarch
    (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Proposal to fix:

  • gather base OS release from executor vm
  • configure baseurl depending on major OS release

For Oracle Linux 8 it should be
baseurl=http://opensource.wandisco.com/rhel/8/git/$basearch/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.