Skip to content

Commit

Permalink
ED-3458: Oci infra provisioning ansible scripts (#3959)
Browse files Browse the repository at this point in the history
* added initial version of oci provisioning

Signed-off-by: Deepak Devadathan <[email protected]>

* added instructions to run the command

Signed-off-by: Deepak Devadathan <[email protected]>

* testing simple network layout

Signed-off-by: Deepak Devadathan <[email protected]>

* testing vm creation

Signed-off-by: Deepak Devadathan <[email protected]>

* testing k8s version

Signed-off-by: Deepak Devadathan <[email protected]>

* create oke

Signed-off-by: Deepak Devadathan <[email protected]>

* testing with oke

Signed-off-by: Deepak Devadathan <[email protected]>

* testing with auth type

Signed-off-by: Deepak Devadathan <[email protected]>

* removed auth_type

Signed-off-by: Deepak Devadathan <[email protected]>

* with min configuration

Signed-off-by: Deepak Devadathan <[email protected]>

* change oke

Signed-off-by: Deepak Devadathan <[email protected]>

* k8s cluster

Signed-off-by: Deepak Devadathan <[email protected]>

* testing images

Signed-off-by: Deepak Devadathan <[email protected]>

* aded tags

Signed-off-by: Deepak Devadathan <[email protected]>

* removed debug

Signed-off-by: Deepak Devadathan <[email protected]>

* setting oke

Signed-off-by: Deepak Devadathan <[email protected]>

* corrected tags

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* disabling options

Signed-off-by: Deepak Devadathan <[email protected]>

* updated subnet id

Signed-off-by: Deepak Devadathan <[email protected]>

* removed options

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* removed service cidr

Signed-off-by: Deepak Devadathan <[email protected]>

* removed options

Signed-off-by: Deepak Devadathan <[email protected]>

* updted

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* removed subnet id

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* testing

Signed-off-by: Deepak Devadathan <[email protected]>

* removed k8s network config

Signed-off-by: Deepak Devadathan <[email protected]>

* re factoring nework

Signed-off-by: Deepak Devadathan <[email protected]>

* testing oke

Signed-off-by: Deepak Devadathan <[email protected]>

* updated route table

Signed-off-by: Deepak Devadathan <[email protected]>

* enabling oke

Signed-off-by: Deepak Devadathan <[email protected]>

* create jenkins

Signed-off-by: Deepak Devadathan <[email protected]>

* added oci cli setup

Signed-off-by: Deepak Devadathan <[email protected]>

* moved oci to bin

Signed-off-by: Deepak Devadathan <[email protected]>

* added profile

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* disabling oke

Signed-off-by: Deepak Devadathan <[email protected]>

* testing bootstrap

Signed-off-by: Deepak Devadathan <[email protected]>

* testing jenkins with bootstrap

Signed-off-by: Deepak Devadathan <[email protected]>

* testing vm bootstrap

Signed-off-by: Deepak Devadathan <[email protected]>

* corrected varible

Signed-off-by: Deepak Devadathan <[email protected]>

* testing neo4j upload

Signed-off-by: Deepak Devadathan <[email protected]>

* testing output

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* testing jenkins info

Signed-off-by: Deepak Devadathan <[email protected]>

* info tgs

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* jenkins without bootstrap

Signed-off-by: Deepak Devadathan <[email protected]>

* disabled private vm

Signed-off-by: Deepak Devadathan <[email protected]>

* removed bootstrapping jenkins

Signed-off-by: Deepak Devadathan <[email protected]>

* test

Signed-off-by: Deepak Devadathan <[email protected]>

* added s3 keys

Signed-off-by: Deepak Devadathan <[email protected]>

* e2e changes

Signed-off-by: Deepak Devadathan <[email protected]>

* removed unwanted comments

Signed-off-by: Deepak Devadathan <[email protected]>

* updated ocir url

Signed-off-by: Deepak Devadathan <[email protected]>

* added disclaimer

Signed-off-by: Deepak Devadathan <[email protected]>

* added defaults

Signed-off-by: Deepak Devadathan <[email protected]>

* removed comments

Signed-off-by: Deepak Devadathan <[email protected]>

* updated name

Signed-off-by: Deepak Devadathan <[email protected]>

* added defaults for vcn and subnet cidr

Signed-off-by: Deepak Devadathan <[email protected]>

* updated variable

Signed-off-by: Deepak Devadathan <[email protected]>

* variable name for repo

Signed-off-by: Deepak Devadathan <[email protected]>

* updated private vm names

Signed-off-by: Deepak Devadathan <[email protected]>

* updated output

Signed-off-by: Deepak Devadathan <[email protected]>

* added geo ip variable check

Signed-off-by: Deepak Devadathan <[email protected]>

* updated the rgion

Signed-off-by: Deepak Devadathan <[email protected]>

* added default env name to append to bucket names

Signed-off-by: Deepak Devadathan <[email protected]>

* corrected syntax for default values

Signed-off-by: Deepak Devadathan <[email protected]>

* added key for instance provisioning

This is added for idempotence of instances

Signed-off-by: Deepak Devadathan <[email protected]>

* updated additional buckets

Signed-off-by: Deepak Devadathan <[email protected]>

* updated the comments

Signed-off-by: Deepak Devadathan <[email protected]>

* added env prefix to vm names

Signed-off-by: Deepak Devadathan <[email protected]>

* added env prefix to oke cluster name

Signed-off-by: Deepak Devadathan <[email protected]>

---------

Signed-off-by: Deepak Devadathan <[email protected]>
  • Loading branch information
ddevadat authored Jul 3, 2024
1 parent 74793b6 commit d1a9dc0
Show file tree
Hide file tree
Showing 3 changed files with 831 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deploy/jenkins/jenkins-server-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ echo -e "\n\e[0;32m${bold}Installating Ansible${normal}"
pip uninstall -y ansible
pip3 install ansible==2.8.19

echo -e "\n\e[0;32m${bold}Installing oci cli ${normal}"
oci_cli_setup_zip="https://github.com/oracle/oci-cli/releases/download/v3.22.0/oci-cli-3.22.0-Ubuntu-18.04-Offline.zip"
wget $oci_cli_setup_zip -O /tmp/ocicli.zip
unzip /tmp/ocicli.zip -d /tmp
cd /tmp
./oci-cli-installation/install.sh --install-dir /var/lib/jenkins --exec-dir /var/lib/jenkins --script-dir /var/lib/jenkins --accept-all-defaults
mv /var/lib/jenkins/oci /usr/bin

echo -e "\n\e[0;32m${bold}Installating azure cli${normal}"
apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc |
Expand Down Expand Up @@ -107,6 +115,10 @@ echo -e "\n\e[0;32m${bold}Creating bashrc for jenkins user ${normal}"
cp /etc/skel/.bashrc /var/lib/jenkins
chown jenkins:jenkins /var/lib/jenkins/.bashrc

echo -e "\n\e[0;32m${bold}Creating profile for jenkins user ${normal}"
echo "export OCI_CLI_AUTH=instance_principal" > /var/lib/jenkins/.profile
chown jenkins:jenkins /var/lib/jenkins/.profile

echo -e "\n\e[0;32m${bold}Setting timezone to IST ${normal}"
timedatectl set-timezone Asia/Kolkata

Expand Down
Loading

0 comments on commit d1a9dc0

Please sign in to comment.