SlideShare a Scribd company logo
1 of 107
Download to read offline
Deploying MySQL InnoDB
Cluster on OCI with Terraform
Oracle Developer Live
Frédéric Descamps
Community Manager
MySQL
Who am I ?
about.me/lefred
Copyright @ 2020 Oracle and/or its affiliates.2
@lefred
MySQL Evangelist
Managing MySQL since
3.20
devops believer
living in Belgium
h ps://lefred.be
Frédéric Descamps
Copyright @ 2020 Oracle and/or its affiliates.3
Sign up
Oracle Cloud Free Trier
Copyright @ 2020 Oracle and/or its affiliates.4
Copyright @ 2020 Oracle and/or its affiliates.5
Breakout Lab Support
Today's Experts Standing By:
- Miguel - Dave
- Olivier - Ted
- Vi orio
Have a Question?
Direct your question via chat to one of our experts above or the instructor.
Breakout Rooms
If you are not able to get your question answered within the chat, we have
breakout rooms available for you.
We ask that if your question requires the use of a breakout room, that the time
within the breakout room remains brief to ensure experts can assist others in
need of help.
Copyright @ 2020 Oracle and/or its affiliates.6
use only Germany Central (Frankfurt) !!
and use the same email you used to register
to this session
Prerequisites
Please create your OCI free account following all the instructions from the Livelabs:
h ps://oracle.github.io/learning-library/oci-library/oci-hol/odl-mysql-idc-terraform-hol-
master/workshops/freetier/
Copyright @ 2020 Oracle and/or its affiliates.7
Free Trier: note on always free
To perform this lab, you need to use a new Free Trier account provided today. If you have
an old one, it might not work if you don't have the free credits.
If this is your case you won't be able to:
use more than 1 node in your cluster
use the NAT gateway and split the databases in a private subnet
And you will have to use VM.Standard.E2.1.Micro shape.
Copyright @ 2020 Oracle and/or its affiliates.8
Infrastructure as Code
What is Terraform ?
Copyright @ 2020 Oracle and/or its affiliates.9
What is Terraform ?
Terraform is a tool for building, changing, and versioning infrastructure safely and
e ciently. Terraform can manage existing and popular service providers as well as custom
in-house solutions.
Copyright @ 2020 Oracle and/or its affiliates.10
Terraform & OCI
Oracle Cloud Infrastructure is supported by Terraform.
We provide many OCI quickstarts in github: h ps://github.com/oracle-quickstart/.
Copyright @ 2020 Oracle and/or its affiliates.11
Terraform & OCI
Oracle Cloud Infrastructure is supported by Terraform.
We provide many OCI quickstarts in github: h ps://github.com/oracle-quickstart/.
Today we will use a contribution to the original MySQL one: h ps://github.com/lefred/oci-
mysql-idc.git
Copyright @ 2020 Oracle and/or its affiliates.11
Architecture
What will we deploy ?
Copyright @ 2020 Oracle and/or its affiliates.12
Architecture
MySQL 1
MySQL 3
VCN
10.0.0.0/16
Public Subnet
10.0.0.0/24
Private Subnet
10.0.1.0/24
Private Subnet
10.0.1.0/24
Group Replication
Fault Domain 1
Fault Domain2
Fault Domain3
MySQL 2
Bastion Host
Copyright @ 2020 Oracle and/or its affiliates.13
Get ready
Se ing up your environment
Copyright @ 2020 Oracle and/or its affiliates.14
an OCI account
Terraform
git
ssh client
on Windows, for git and ssh, you should use
h ps://github.com/git-for-windows/git/releases/latest
Se ing up your environment
You need:
Copyright @ 2020 Oracle and/or its affiliates.15
Prerequisites &
Introduction
Copyright @ 2020 Oracle and/or its affiliates.16
Prerequisites &
Introduction
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.16
Update your feedback
At the end of each LAB, please update your feedback in the participants list:
Copyright @ 2020 Oracle and/or its affiliates.17
Creating your API keys:
$ mkdir ~/.oci
$ openssl genrsa -out ~/.oci/oci_api_key.pem 2048
$ chmod go-rwx ~/.oci/oci_api_key.pem
$ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem
And for SSH don't provide passphrase:
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/fred/.ssh/id_rsa): id_rsa_oci
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa_oci
Your public key has been saved in id_rsa_oci.pub
Prepare your OCI environment
Copyright @ 2020 Oracle and/or its affiliates.18
Prepare your OCI environment (2)
Example for our Windows user friends:
Copyright @ 2020 Oracle and/or its affiliates.19
Prepare your OCI environment (3)
Example for our Windows user friends - API keys:
Copyright @ 2020 Oracle and/or its affiliates.20
Prepare your OCI environment (4)
Example for our Windows user friends - SSH keys:
Copyright @ 2020 Oracle and/or its affiliates.21
In our example, the key is
~/.oci/oci_api_key_public.pem
Prepare your OCI environment - deploy your API key
You need to deploy your public API key on OCI:
Copyright @ 2020 Oracle and/or its affiliates.22
LAB 1
Copyright @ 2020 Oracle and/or its affiliates.23
LAB 1
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.23
Terraform is a unique binary you can download from
h ps://www.terraform.io/downloads.html
$ cd ~bin
$ wget 
https://releases.hashicorp.com/terraform/0.13.4/terraform_0.13.4_linux_amd64.zip
$ unzip terraform_0.13.4_linux_amd64.zip
Archive: terraform_0.13.4_linux_amd64.zip
inflating: terraform
$ terraform --version
Terraform v0.13.4
Installing Terraform
Copyright @ 2020 Oracle and/or its affiliates.24
Installing Terraform (2)
Example for our Windows user friends:
Copyright @ 2020 Oracle and/or its affiliates.25
$ git clone https://github.com/lefred/oci-mysql-idc.git
Ge ing the git repo
Copyright @ 2020 Oracle and/or its affiliates.26
$ git clone https://github.com/lefred/oci-mysql-idc.git
Ge ing the git repo
Now we need to copy terraform.tfvars.template to edit it:
$ cd oci-mysql-idc
$ cp terraform.tfvars.template terraform.tfvars
Copyright @ 2020 Oracle and/or its affiliates.26
$ git clone https://github.com/lefred/oci-mysql-idc.git
Ge ing the git repo
Now we need to copy terraform.tfvars.template to edit it:
$ cd oci-mysql-idc
$ cp terraform.tfvars.template terraform.tfvars
This is maybe the most complex task of the deployment ;-)
Copyright @ 2020 Oracle and/or its affiliates.26
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.27
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.28
tenancy_oid
Copyright @ 2020 Oracle and/or its affiliates.29
tenancy_oid (2)
Copyright @ 2020 Oracle and/or its affiliates.30
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.31
user_ocid
Copyright @ 2020 Oracle and/or its affiliates.32
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.33
Key & Fingerprint
The private_key_path value is the path of oci_api_key.pem:
private_key_path = "/home/fred/.oci/oci_api_key.pem"
Copyright @ 2020 Oracle and/or its affiliates.34
Key & Fingerprint
The private_key_path value is the path of oci_api_key.pem:
private_key_path = "/home/fred/.oci/oci_api_key.pem"
And to get the Fingerprint:
Copyright @ 2020 Oracle and/or its affiliates.34
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.35
us-gov-ashburn-1
us-gov-chicago-1
us-gov-phoenix-1
us-langley-1
us-luke-1
us-phoenix-1
us-sanjose-1
eu-amsterdam-1
eu-frankfurt-1
eu-zurich-1
me-jeddah-1
sa-saopaulo-1
uk-london-1
us-ashburn-1
ap-chuncheon-1
ap-hyderabad-1
ap-melbourne-1
ap-mumbai-1
ap-osaka-1
ap-seoul-1
ap-sydney-1
ap-tokyo-1
ca-montreal-1
ca-toronto-1
Region
The di erent regions (not all accessible) as on September 2020 are:
Copyright @ 2020 Oracle and/or its affiliates.36
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.37
compartment_ocid
You may or not have setup di erent compartments. I usually use a sandbox for example.
Copyright @ 2020 Oracle and/or its affiliates.38
compartment_ocid (2)
Copyright @ 2020 Oracle and/or its affiliates.39
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.40
SSH Keys
You need to specify keys to connect in ssh to the compute instances (only via the bastion
host to the MySQL InnoDB Cluster nodes).
Copyright @ 2020 Oracle and/or its affiliates.41
SSH Keys
You need to specify keys to connect in ssh to the compute instances (only via the bastion
host to the MySQL InnoDB Cluster nodes).
Pay a ention to provide the full path and to verify that the private keys are those without
.pub !
Copyright @ 2020 Oracle and/or its affiliates.41
SSH Keys
You need to specify keys to connect in ssh to the compute instances (only via the bastion
host to the MySQL InnoDB Cluster nodes).
Pay a ention to provide the full path and to verify that the private keys are those without
.pub !
ssh_authorized_keys_path = "/home/fred/.ssh/id_rsa_oci.pub"
ssh_private_key_path = "/home/fred/.ssh/id_rsa_oci"
Copyright @ 2020 Oracle and/or its affiliates.41
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.42
Cluster information
The dedicated user that we create is called clusteradmin and you can specify its password.
You can also specify and name for the cluster.
clusteradmin_password = "MyB1gPassw0rd!"
cluster_name = "MyClusterInOCI"
Copyright @ 2020 Oracle and/or its affiliates.43
Cluster information
The dedicated user that we create is called clusteradmin and you can specify its password.
You can also specify and name for the cluster.
clusteradmin_password = "MyB1gPassw0rd!"
cluster_name = "MyClusterInOCI"
You can also specify the number of nodes that needs to be deployed in your cluster. 3 is
the recommended amount but for testing purpose when you develop your Terraform
recipes, you can reduce it.
number_of_nodes = "2"
Copyright @ 2020 Oracle and/or its affiliates.43
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
Copyright @ 2020 Oracle and/or its affiliates.44
More info on
h ps://docs.cloud.oracle.com/en-
us/iaas/Content/Compute/References/compute
Node Shape
This speci es the Compute Instance's Shape. Of course it depends on your limits.
You can nd the di erent shapes on OCI Dashboard:
Copyright @ 2020 Oracle and/or its affiliates.45
Node Shape (2)
Using the Free Trier provided today, the node shape should be VM.Standard.E2.1
Copyright @ 2020 Oracle and/or its affiliates.46
terraform.tvars
tenancy_ocid = "<REPLACE_ME>"
user_ocid = "<REPLACE_ME>"
fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX"
private_key_path = "<REPLACE_ME>.pem"
region = "<REPLACE_ME>"
compartment_ocid = "<REPLACE_ME>"
ssh_authorized_keys_path = "<REPLACE_ME>"
ssh_private_key_path = "<REPLACE_ME>"
clusteradmin_password = "<REPLACE_ME>"
cluster_name = "MyClusterInOCI"
number_of_nodes = "3"
node_shape = "VM.Standard.E2.1"
node_image_id="ocid1.image..."
Copyright @ 2020 Oracle and/or its affiliates.47
Oracle Linux 8.2-2020.07.28-0 is for example:
eu-
frankfurt-
1
ocid1.image.oc1.eu-frankfurt-
1.aaaaaaaau6ypymprt22fhkenua6fbz2mhy62kdbn6zskrv3fy7fdrq c4ka
us-
ashburn-
1
ocid1.image.oc1.iad.aaaaaaaa7loygdwzmew3hud3bqjyzamzqnz3krpiuhjb3z3u5s3hmmtar6mq
node_image_id - (optional)
This is the ocid of the compute instance you will use. For this demo, we will use the same
on all nodes. The image depends of your region.
You can nd the list of images on h ps://docs.cloud.oracle.com/en-us/iaas/images/
Copyright @ 2020 Oracle and/or its affiliates.48
Oracle Linux 8.2-2020.07.28-0 is for example:
eu-
frankfurt-
1
ocid1.image.oc1.eu-frankfurt-
1.aaaaaaaau6ypymprt22fhkenua6fbz2mhy62kdbn6zskrv3fy7fdrq c4ka
us-
ashburn-
1
ocid1.image.oc1.iad.aaaaaaaa7loygdwzmew3hud3bqjyzamzqnz3krpiuhjb3z3u5s3hmmtar6mq
node_image_id - (optional)
This is the ocid of the compute instance you will use. For this demo, we will use the same
on all nodes. The image depends of your region.
You can nd the list of images on h ps://docs.cloud.oracle.com/en-us/iaas/images/
If you don't specify any, Oracle Linux 8 images in your region
will be used.
Copyright @ 2020 Oracle and/or its affiliates.48
LAB 2
Copyright @ 2020 Oracle and/or its affiliates.49
LAB 2
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.49
Terraform in action
It's time to deploy !
Copyright @ 2020 Oracle and/or its affiliates.50
Terraform
Now that everything is setup, we need to init our environment:
$ terraform init
Copyright @ 2020 Oracle and/or its affiliates.51
Terraform
Now that everything is setup, we need to init our environment:
$ terraform init
Copyright @ 2020 Oracle and/or its affiliates.51
Terraform - plan
Let's see if everything is correct and what the system will deploy in OCI using the plan
command:
$ terraform plan
Copyright @ 2020 Oracle and/or its affiliates.52
Terraform - plan
Let's see if everything is correct and what the system will deploy in OCI using the plan
command:
$ terraform plan
Copyright @ 2020 Oracle and/or its affiliates.52
Terraform - deployment
Let's deploy our infrastructure with apply:
$ terraform apply
Copyright @ 2020 Oracle and/or its affiliates.53
Terraform - deployment
Let's deploy our infrastructure with apply:
$ terraform apply
Copyright @ 2020 Oracle and/or its affiliates.53
Terraform - deployment (2)
While the deployment is happening, you can verify in OCI Dashboard, the creation of the
compute instances:
Copyright @ 2020 Oracle and/or its affiliates.54
Terraform - deployment (3)
Copyright @ 2020 Oracle and/or its affiliates.55
LAB 3
Copyright @ 2020 Oracle and/or its affiliates.56
LAB 3
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.56
Let's verify
MySQL InnoDB Cluster
Copyright @ 2020 Oracle and/or its affiliates.57
Connection to the Bastion Host
To connect to the bastion host, we use ssh with the user opc on the public IP (use yours!)
and the ssh key we created:
Copyright @ 2020 Oracle and/or its affiliates.58
MySQL InnoDB Cluster
Let's connect to the cluster using MySQL Shell
Copyright @ 2020 Oracle and/or its affiliates.59
MySQL InnoDB Cluster - Status
Copyright @ 2020 Oracle and/or its affiliates.60
MySQL InnoDB Cluster - Router
Copyright @ 2020 Oracle and/or its affiliates.61
MySQL InnoDB Cluster - Router
For security reason, we didn't open the MySQL Router ports on the public IP.
Copyright @ 2020 Oracle and/or its affiliates.61
LAB 4
Copyright @ 2020 Oracle and/or its affiliates.62
LAB 4
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.62
House keeping, you only pay what you
consume !
Cleaning up !
Copyright @ 2020 Oracle and/or its affiliates.63
Terraform - terminating our environment
It's also very easy to terminate everything using the destroy command:
$ terraform destroy
Copyright @ 2020 Oracle and/or its affiliates.64
Terraform - terminating our environment
It's also very easy to terminate everything using the destroy command:
$ terraform destroy
Copyright @ 2020 Oracle and/or its affiliates.64
Terraform - terminating our environment
It's also very easy to terminate everything using the destroy command:
$ terraform destroy
Copyright @ 2020 Oracle and/or its affiliates.64
LAB 5
Copyright @ 2020 Oracle and/or its affiliates.65
LAB 5
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.65
OCI Resource Manager
... and now for smart & lazy people ;-)
Copyright @ 2020 Oracle and/or its affiliates.66
OCI Resource Manager
It's also possible to deploy without pain, the same architecture using OCI Resource and
Stacks !
Copyright @ 2020 Oracle and/or its affiliates.67
OCI Resource Manager - stack creation
Let's create our stack:
Copyright @ 2020 Oracle and/or its affiliates.68
OCI Resource Manager - stack creation (2)
Now we can download the stack package on h ps://github.com/lefred/oci-mysql-
idc/releases/tag/1.1.0
Copyright @ 2020 Oracle and/or its affiliates.69
OCI Resource Manager - stack creation (3)
Just drop the zip le here:
Copyright @ 2020 Oracle and/or its affiliates.70
OCI Resource Manager - stack creation (5)
Fill some variables:
Copyright @ 2020 Oracle and/or its affiliates.71
OCI Resource Manager - stack creation (6)
Let's start with only 1 MySQL InnoDB Cluster node:
Copyright @ 2020 Oracle and/or its affiliates.72
OCI Resource Manager - stack creation review
We can review the variables and create it:
Copyright @ 2020 Oracle and/or its affiliates.73
OCI Resource Manager - jobs
The rst job we will run it the plan to see what will be the required modi cations:
Copyright @ 2020 Oracle and/or its affiliates.74
OCI Resource Manager - jobs (2)
If all went well, we will see it as succeeded:
Copyright @ 2020 Oracle and/or its affiliates.75
OCI Resource Manager - apply job
As the plan succeeded, we can apply our code for this infrastructure:
Copyright @ 2020 Oracle and/or its affiliates.76
OCI Resource Manager - apply job (2)
It's possible to follow the process in "real time" in the logs:
Copyright @ 2020 Oracle and/or its affiliates.77
The Terraform output
is a bit di erent as
everything was
handled by the stack.
All required SSH keys
were also created:
OCI Resource Manager - apply job (3)
Copyright @ 2020 Oracle and/or its affiliates.78
OCI Resource Manager - compute instances
Of course the compute instances were created:
Copyright @ 2020 Oracle and/or its affiliates.79
Connection
We need to copy the SSH private key from the jobs output in a le if we want to connect to
the bastion host. We also need to change the ownership of it:
$ vi priv.key
<-- paste the content in the file and save it -->
$ chmod 600 priv.key
$ ssh -i priv.key opc@130.61.xx.xx
[opc@mysqlshellbastion ~]$
Copyright @ 2020 Oracle and/or its affiliates.80
LAB 6
Copyright @ 2020 Oracle and/or its affiliates.81
LAB 6
ready ? update your feedback !
Copyright @ 2020 Oracle and/or its affiliates.81
Thank you !
Copyright @ 2020 Oracle and/or its affiliates.83
Q&A
Copyright @ 2020 Oracle and/or its affiliates.84
Only for HOL
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform

More Related Content

What's hot

Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021Frederic Descamps
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...Frederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...Frederic Descamps
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesFrederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldFrederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0Frederic Descamps
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...Frederic Descamps
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialFrederic Descamps
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSFrederic Descamps
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Frederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQLOracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQLFrederic Descamps
 
Mysql Fun
Mysql FunMysql Fun
Mysql FunSHC
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellFrederic Descamps
 

What's hot (20)

MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New World
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQLOracle Open World Middle East - MySQL 8 a Giant Leap for SQL
Oracle Open World Middle East - MySQL 8 a Giant Leap for SQL
 
Mysql Fun
Mysql FunMysql Fun
Mysql Fun
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
 

Similar to Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform

Terraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud InfrastructureTerraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud InfrastructureBobby Curtis
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022Frederic Descamps
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
ECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp TerraformECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp TerraformBobby Curtis
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allMarc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeGeorgi Kodinov
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworksphanleson
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera SoftwareOWASP
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they doDave Stokes
 
Oracle cloud data interface
Oracle cloud data interfaceOracle cloud data interface
Oracle cloud data interfaceOracle Korea
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMiguel Araújo
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Jonas Rosland
 
Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Biju Thomas
 

Similar to Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform (20)

Terraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud InfrastructureTerraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud Infrastructure
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
ECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp TerraformECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp Terraform
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
 
Oracle cloud data interface
Oracle cloud data interfaceOracle cloud data interface
Oracle cloud data interface
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 
Sjug aug 2010_cloud
Sjug aug 2010_cloudSjug aug 2010_cloud
Sjug aug 2010_cloud
 
Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015Open Source, infrastructure as Code, Cloud Native Apps 2015
Open Source, infrastructure as Code, Cloud Native Apps 2015
 
Need 4 Speed FI
Need 4 Speed FINeed 4 Speed FI
Need 4 Speed FI
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12
 
2018 Writing Offensive .Net Tools
2018 Writing Offensive .Net Tools2018 Writing Offensive .Net Tools
2018 Writing Offensive .Net Tools
 

More from Frederic Descamps

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionFrederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQLFrederic Descamps
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...Frederic Descamps
 

More from Frederic Descamps (10)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform

  • 1. Deploying MySQL InnoDB Cluster on OCI with Terraform Oracle Developer Live Frédéric Descamps Community Manager MySQL
  • 2. Who am I ? about.me/lefred Copyright @ 2020 Oracle and/or its affiliates.2
  • 3. @lefred MySQL Evangelist Managing MySQL since 3.20 devops believer living in Belgium h ps://lefred.be Frédéric Descamps Copyright @ 2020 Oracle and/or its affiliates.3
  • 4. Sign up Oracle Cloud Free Trier Copyright @ 2020 Oracle and/or its affiliates.4
  • 5. Copyright @ 2020 Oracle and/or its affiliates.5
  • 6. Breakout Lab Support Today's Experts Standing By: - Miguel - Dave - Olivier - Ted - Vi orio Have a Question? Direct your question via chat to one of our experts above or the instructor. Breakout Rooms If you are not able to get your question answered within the chat, we have breakout rooms available for you. We ask that if your question requires the use of a breakout room, that the time within the breakout room remains brief to ensure experts can assist others in need of help. Copyright @ 2020 Oracle and/or its affiliates.6
  • 7. use only Germany Central (Frankfurt) !! and use the same email you used to register to this session Prerequisites Please create your OCI free account following all the instructions from the Livelabs: h ps://oracle.github.io/learning-library/oci-library/oci-hol/odl-mysql-idc-terraform-hol- master/workshops/freetier/ Copyright @ 2020 Oracle and/or its affiliates.7
  • 8. Free Trier: note on always free To perform this lab, you need to use a new Free Trier account provided today. If you have an old one, it might not work if you don't have the free credits. If this is your case you won't be able to: use more than 1 node in your cluster use the NAT gateway and split the databases in a private subnet And you will have to use VM.Standard.E2.1.Micro shape. Copyright @ 2020 Oracle and/or its affiliates.8
  • 9. Infrastructure as Code What is Terraform ? Copyright @ 2020 Oracle and/or its affiliates.9
  • 10. What is Terraform ? Terraform is a tool for building, changing, and versioning infrastructure safely and e ciently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Copyright @ 2020 Oracle and/or its affiliates.10
  • 11. Terraform & OCI Oracle Cloud Infrastructure is supported by Terraform. We provide many OCI quickstarts in github: h ps://github.com/oracle-quickstart/. Copyright @ 2020 Oracle and/or its affiliates.11
  • 12. Terraform & OCI Oracle Cloud Infrastructure is supported by Terraform. We provide many OCI quickstarts in github: h ps://github.com/oracle-quickstart/. Today we will use a contribution to the original MySQL one: h ps://github.com/lefred/oci- mysql-idc.git Copyright @ 2020 Oracle and/or its affiliates.11
  • 13. Architecture What will we deploy ? Copyright @ 2020 Oracle and/or its affiliates.12
  • 14. Architecture MySQL 1 MySQL 3 VCN 10.0.0.0/16 Public Subnet 10.0.0.0/24 Private Subnet 10.0.1.0/24 Private Subnet 10.0.1.0/24 Group Replication Fault Domain 1 Fault Domain2 Fault Domain3 MySQL 2 Bastion Host Copyright @ 2020 Oracle and/or its affiliates.13
  • 15. Get ready Se ing up your environment Copyright @ 2020 Oracle and/or its affiliates.14
  • 16. an OCI account Terraform git ssh client on Windows, for git and ssh, you should use h ps://github.com/git-for-windows/git/releases/latest Se ing up your environment You need: Copyright @ 2020 Oracle and/or its affiliates.15
  • 17. Prerequisites & Introduction Copyright @ 2020 Oracle and/or its affiliates.16
  • 18. Prerequisites & Introduction ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.16
  • 19. Update your feedback At the end of each LAB, please update your feedback in the participants list: Copyright @ 2020 Oracle and/or its affiliates.17
  • 20. Creating your API keys: $ mkdir ~/.oci $ openssl genrsa -out ~/.oci/oci_api_key.pem 2048 $ chmod go-rwx ~/.oci/oci_api_key.pem $ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem And for SSH don't provide passphrase: $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/fred/.ssh/id_rsa): id_rsa_oci Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in id_rsa_oci Your public key has been saved in id_rsa_oci.pub Prepare your OCI environment Copyright @ 2020 Oracle and/or its affiliates.18
  • 21. Prepare your OCI environment (2) Example for our Windows user friends: Copyright @ 2020 Oracle and/or its affiliates.19
  • 22. Prepare your OCI environment (3) Example for our Windows user friends - API keys: Copyright @ 2020 Oracle and/or its affiliates.20
  • 23. Prepare your OCI environment (4) Example for our Windows user friends - SSH keys: Copyright @ 2020 Oracle and/or its affiliates.21
  • 24. In our example, the key is ~/.oci/oci_api_key_public.pem Prepare your OCI environment - deploy your API key You need to deploy your public API key on OCI: Copyright @ 2020 Oracle and/or its affiliates.22
  • 25. LAB 1 Copyright @ 2020 Oracle and/or its affiliates.23
  • 26. LAB 1 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.23
  • 27. Terraform is a unique binary you can download from h ps://www.terraform.io/downloads.html $ cd ~bin $ wget https://releases.hashicorp.com/terraform/0.13.4/terraform_0.13.4_linux_amd64.zip $ unzip terraform_0.13.4_linux_amd64.zip Archive: terraform_0.13.4_linux_amd64.zip inflating: terraform $ terraform --version Terraform v0.13.4 Installing Terraform Copyright @ 2020 Oracle and/or its affiliates.24
  • 28. Installing Terraform (2) Example for our Windows user friends: Copyright @ 2020 Oracle and/or its affiliates.25
  • 29. $ git clone https://github.com/lefred/oci-mysql-idc.git Ge ing the git repo Copyright @ 2020 Oracle and/or its affiliates.26
  • 30. $ git clone https://github.com/lefred/oci-mysql-idc.git Ge ing the git repo Now we need to copy terraform.tfvars.template to edit it: $ cd oci-mysql-idc $ cp terraform.tfvars.template terraform.tfvars Copyright @ 2020 Oracle and/or its affiliates.26
  • 31. $ git clone https://github.com/lefred/oci-mysql-idc.git Ge ing the git repo Now we need to copy terraform.tfvars.template to edit it: $ cd oci-mysql-idc $ cp terraform.tfvars.template terraform.tfvars This is maybe the most complex task of the deployment ;-) Copyright @ 2020 Oracle and/or its affiliates.26
  • 32. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.27
  • 33. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.28
  • 34. tenancy_oid Copyright @ 2020 Oracle and/or its affiliates.29
  • 35. tenancy_oid (2) Copyright @ 2020 Oracle and/or its affiliates.30
  • 36. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.31
  • 37. user_ocid Copyright @ 2020 Oracle and/or its affiliates.32
  • 38. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.33
  • 39. Key & Fingerprint The private_key_path value is the path of oci_api_key.pem: private_key_path = "/home/fred/.oci/oci_api_key.pem" Copyright @ 2020 Oracle and/or its affiliates.34
  • 40. Key & Fingerprint The private_key_path value is the path of oci_api_key.pem: private_key_path = "/home/fred/.oci/oci_api_key.pem" And to get the Fingerprint: Copyright @ 2020 Oracle and/or its affiliates.34
  • 41. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.35
  • 43. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.37
  • 44. compartment_ocid You may or not have setup di erent compartments. I usually use a sandbox for example. Copyright @ 2020 Oracle and/or its affiliates.38
  • 45. compartment_ocid (2) Copyright @ 2020 Oracle and/or its affiliates.39
  • 46. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.40
  • 47. SSH Keys You need to specify keys to connect in ssh to the compute instances (only via the bastion host to the MySQL InnoDB Cluster nodes). Copyright @ 2020 Oracle and/or its affiliates.41
  • 48. SSH Keys You need to specify keys to connect in ssh to the compute instances (only via the bastion host to the MySQL InnoDB Cluster nodes). Pay a ention to provide the full path and to verify that the private keys are those without .pub ! Copyright @ 2020 Oracle and/or its affiliates.41
  • 49. SSH Keys You need to specify keys to connect in ssh to the compute instances (only via the bastion host to the MySQL InnoDB Cluster nodes). Pay a ention to provide the full path and to verify that the private keys are those without .pub ! ssh_authorized_keys_path = "/home/fred/.ssh/id_rsa_oci.pub" ssh_private_key_path = "/home/fred/.ssh/id_rsa_oci" Copyright @ 2020 Oracle and/or its affiliates.41
  • 50. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.42
  • 51. Cluster information The dedicated user that we create is called clusteradmin and you can specify its password. You can also specify and name for the cluster. clusteradmin_password = "MyB1gPassw0rd!" cluster_name = "MyClusterInOCI" Copyright @ 2020 Oracle and/or its affiliates.43
  • 52. Cluster information The dedicated user that we create is called clusteradmin and you can specify its password. You can also specify and name for the cluster. clusteradmin_password = "MyB1gPassw0rd!" cluster_name = "MyClusterInOCI" You can also specify the number of nodes that needs to be deployed in your cluster. 3 is the recommended amount but for testing purpose when you develop your Terraform recipes, you can reduce it. number_of_nodes = "2" Copyright @ 2020 Oracle and/or its affiliates.43
  • 53. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" Copyright @ 2020 Oracle and/or its affiliates.44
  • 54. More info on h ps://docs.cloud.oracle.com/en- us/iaas/Content/Compute/References/compute Node Shape This speci es the Compute Instance's Shape. Of course it depends on your limits. You can nd the di erent shapes on OCI Dashboard: Copyright @ 2020 Oracle and/or its affiliates.45
  • 55. Node Shape (2) Using the Free Trier provided today, the node shape should be VM.Standard.E2.1 Copyright @ 2020 Oracle and/or its affiliates.46
  • 56. terraform.tvars tenancy_ocid = "<REPLACE_ME>" user_ocid = "<REPLACE_ME>" fingerprint= "RE:PL:AC:E_:ME:__:RE:PL:AC:E_:ME:__:XX:XX:XX:XX" private_key_path = "<REPLACE_ME>.pem" region = "<REPLACE_ME>" compartment_ocid = "<REPLACE_ME>" ssh_authorized_keys_path = "<REPLACE_ME>" ssh_private_key_path = "<REPLACE_ME>" clusteradmin_password = "<REPLACE_ME>" cluster_name = "MyClusterInOCI" number_of_nodes = "3" node_shape = "VM.Standard.E2.1" node_image_id="ocid1.image..." Copyright @ 2020 Oracle and/or its affiliates.47
  • 57. Oracle Linux 8.2-2020.07.28-0 is for example: eu- frankfurt- 1 ocid1.image.oc1.eu-frankfurt- 1.aaaaaaaau6ypymprt22fhkenua6fbz2mhy62kdbn6zskrv3fy7fdrq c4ka us- ashburn- 1 ocid1.image.oc1.iad.aaaaaaaa7loygdwzmew3hud3bqjyzamzqnz3krpiuhjb3z3u5s3hmmtar6mq node_image_id - (optional) This is the ocid of the compute instance you will use. For this demo, we will use the same on all nodes. The image depends of your region. You can nd the list of images on h ps://docs.cloud.oracle.com/en-us/iaas/images/ Copyright @ 2020 Oracle and/or its affiliates.48
  • 58. Oracle Linux 8.2-2020.07.28-0 is for example: eu- frankfurt- 1 ocid1.image.oc1.eu-frankfurt- 1.aaaaaaaau6ypymprt22fhkenua6fbz2mhy62kdbn6zskrv3fy7fdrq c4ka us- ashburn- 1 ocid1.image.oc1.iad.aaaaaaaa7loygdwzmew3hud3bqjyzamzqnz3krpiuhjb3z3u5s3hmmtar6mq node_image_id - (optional) This is the ocid of the compute instance you will use. For this demo, we will use the same on all nodes. The image depends of your region. You can nd the list of images on h ps://docs.cloud.oracle.com/en-us/iaas/images/ If you don't specify any, Oracle Linux 8 images in your region will be used. Copyright @ 2020 Oracle and/or its affiliates.48
  • 59. LAB 2 Copyright @ 2020 Oracle and/or its affiliates.49
  • 60. LAB 2 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.49
  • 61. Terraform in action It's time to deploy ! Copyright @ 2020 Oracle and/or its affiliates.50
  • 62. Terraform Now that everything is setup, we need to init our environment: $ terraform init Copyright @ 2020 Oracle and/or its affiliates.51
  • 63. Terraform Now that everything is setup, we need to init our environment: $ terraform init Copyright @ 2020 Oracle and/or its affiliates.51
  • 64. Terraform - plan Let's see if everything is correct and what the system will deploy in OCI using the plan command: $ terraform plan Copyright @ 2020 Oracle and/or its affiliates.52
  • 65. Terraform - plan Let's see if everything is correct and what the system will deploy in OCI using the plan command: $ terraform plan Copyright @ 2020 Oracle and/or its affiliates.52
  • 66. Terraform - deployment Let's deploy our infrastructure with apply: $ terraform apply Copyright @ 2020 Oracle and/or its affiliates.53
  • 67. Terraform - deployment Let's deploy our infrastructure with apply: $ terraform apply Copyright @ 2020 Oracle and/or its affiliates.53
  • 68. Terraform - deployment (2) While the deployment is happening, you can verify in OCI Dashboard, the creation of the compute instances: Copyright @ 2020 Oracle and/or its affiliates.54
  • 69. Terraform - deployment (3) Copyright @ 2020 Oracle and/or its affiliates.55
  • 70. LAB 3 Copyright @ 2020 Oracle and/or its affiliates.56
  • 71. LAB 3 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.56
  • 72. Let's verify MySQL InnoDB Cluster Copyright @ 2020 Oracle and/or its affiliates.57
  • 73. Connection to the Bastion Host To connect to the bastion host, we use ssh with the user opc on the public IP (use yours!) and the ssh key we created: Copyright @ 2020 Oracle and/or its affiliates.58
  • 74. MySQL InnoDB Cluster Let's connect to the cluster using MySQL Shell Copyright @ 2020 Oracle and/or its affiliates.59
  • 75. MySQL InnoDB Cluster - Status Copyright @ 2020 Oracle and/or its affiliates.60
  • 76. MySQL InnoDB Cluster - Router Copyright @ 2020 Oracle and/or its affiliates.61
  • 77. MySQL InnoDB Cluster - Router For security reason, we didn't open the MySQL Router ports on the public IP. Copyright @ 2020 Oracle and/or its affiliates.61
  • 78. LAB 4 Copyright @ 2020 Oracle and/or its affiliates.62
  • 79. LAB 4 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.62
  • 80. House keeping, you only pay what you consume ! Cleaning up ! Copyright @ 2020 Oracle and/or its affiliates.63
  • 81. Terraform - terminating our environment It's also very easy to terminate everything using the destroy command: $ terraform destroy Copyright @ 2020 Oracle and/or its affiliates.64
  • 82. Terraform - terminating our environment It's also very easy to terminate everything using the destroy command: $ terraform destroy Copyright @ 2020 Oracle and/or its affiliates.64
  • 83. Terraform - terminating our environment It's also very easy to terminate everything using the destroy command: $ terraform destroy Copyright @ 2020 Oracle and/or its affiliates.64
  • 84. LAB 5 Copyright @ 2020 Oracle and/or its affiliates.65
  • 85. LAB 5 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.65
  • 86. OCI Resource Manager ... and now for smart & lazy people ;-) Copyright @ 2020 Oracle and/or its affiliates.66
  • 87. OCI Resource Manager It's also possible to deploy without pain, the same architecture using OCI Resource and Stacks ! Copyright @ 2020 Oracle and/or its affiliates.67
  • 88. OCI Resource Manager - stack creation Let's create our stack: Copyright @ 2020 Oracle and/or its affiliates.68
  • 89. OCI Resource Manager - stack creation (2) Now we can download the stack package on h ps://github.com/lefred/oci-mysql- idc/releases/tag/1.1.0 Copyright @ 2020 Oracle and/or its affiliates.69
  • 90. OCI Resource Manager - stack creation (3) Just drop the zip le here: Copyright @ 2020 Oracle and/or its affiliates.70
  • 91. OCI Resource Manager - stack creation (5) Fill some variables: Copyright @ 2020 Oracle and/or its affiliates.71
  • 92. OCI Resource Manager - stack creation (6) Let's start with only 1 MySQL InnoDB Cluster node: Copyright @ 2020 Oracle and/or its affiliates.72
  • 93. OCI Resource Manager - stack creation review We can review the variables and create it: Copyright @ 2020 Oracle and/or its affiliates.73
  • 94. OCI Resource Manager - jobs The rst job we will run it the plan to see what will be the required modi cations: Copyright @ 2020 Oracle and/or its affiliates.74
  • 95. OCI Resource Manager - jobs (2) If all went well, we will see it as succeeded: Copyright @ 2020 Oracle and/or its affiliates.75
  • 96. OCI Resource Manager - apply job As the plan succeeded, we can apply our code for this infrastructure: Copyright @ 2020 Oracle and/or its affiliates.76
  • 97. OCI Resource Manager - apply job (2) It's possible to follow the process in "real time" in the logs: Copyright @ 2020 Oracle and/or its affiliates.77
  • 98. The Terraform output is a bit di erent as everything was handled by the stack. All required SSH keys were also created: OCI Resource Manager - apply job (3) Copyright @ 2020 Oracle and/or its affiliates.78
  • 99. OCI Resource Manager - compute instances Of course the compute instances were created: Copyright @ 2020 Oracle and/or its affiliates.79
  • 100. Connection We need to copy the SSH private key from the jobs output in a le if we want to connect to the bastion host. We also need to change the ownership of it: $ vi priv.key <-- paste the content in the file and save it --> $ chmod 600 priv.key $ ssh -i priv.key opc@130.61.xx.xx [opc@mysqlshellbastion ~]$ Copyright @ 2020 Oracle and/or its affiliates.80
  • 101. LAB 6 Copyright @ 2020 Oracle and/or its affiliates.81
  • 102. LAB 6 ready ? update your feedback ! Copyright @ 2020 Oracle and/or its affiliates.81
  • 103.
  • 104. Thank you ! Copyright @ 2020 Oracle and/or its affiliates.83
  • 105. Q&A Copyright @ 2020 Oracle and/or its affiliates.84