SlideShare une entreprise Scribd logo
1  sur  39
Devops for
databases
Osama Mustafa
About me
oFounder/CEO for Gurus Solutions
oLeader & Director for JAOUG
oOracle ACE Director
o6x of OCI, 4x AWS and 5x Azure
oAutomation Lover
oStart as DBA and still working on different Of Databases.
o Author of two books and working on my 3rd one.
oPresenter & Contributor in Oracle Community
oPublished articles in different magazines
oBlogger on osamaoracle.com
My Books
Agenda
Questions & Answers.
Automation Examples.
How DevOps will make DBA life Easier ?
Understand the DevOps ? What , Why , When
?
DevOps is a software development
method that stresses communication,
collaboration, integration, automation and
measurement of cooperation between
software developers and other IT
professionals.
DevOps is sometimes treated
as a concept, a philosophy, a
job role or a set of tools.
DevOps is not all about
automation, but it enables fast
feedback loops and encourages
a culture of collaboration
Evolution of DevOps
Dev Vs Ops
Why DevOps ?
1. Speed deployment processes
2. Enable fast response to changing business requirements
3. Reduce the risk of production changes causing outages
4. Break down silos
Is DevOps Agile ?
• When a task becomes (extremely) repetitive.
• The Task will take so much manual work.
• The task output either will be too much or less.
• Some other reason why to use DevOps :-
• Eliminate human interaction.
• Errors, things not able to work.
• Differences in paths
• Differences in settings
Why DevOps With Oracle -
Problem
• Terraform
• Ansible
• Jenkins
• Puppet
• Chef
• Salt
Oracle Using DevOps – Tools
Examples
Tools How it work Focusing
Terraform Agentless Admin Focused , IAAC
Ansible agentless Admin Focused , Configuration
Management
Jenkins Agentless Dev and can be work for admin
also, CI/CD
Puppet agent based Dev Focused
Chef agent based Dev Focused
Salt Agent, Agentless Admin Focused
How Ansible works ?
• Agentless:
Ansible doesn’t require agents to be installed on your target servers.
Instead, it connects through the secured SSH protocol to execute its tasks.
• Facts:
Facts are a set of variables that Ansible will collect on target hosts at run
time. Those variables are then usable within your scripts. Facts are almost
all information you may need from a target host like the IPs, NICs, Devices,
etc. You can even add your fact like the list of Oracle instance running with
their Oracle Home for example.
Two levels:
• You can use the so-called ad-hoc command line tool. This tool will permit
you with one command line to execute actions, like creating OS users, on
multiple servers.
• Then you may want to script a set of operations. For that purpose, you’ll
use Playbook. A playbook is a file contention your sequence of operations
in a YAML format.
• RHEL/CentOS Linux
• $ sudo yum install ansible
• Debian/Ubuntu Linux
• $ sudo apt-get install software-properties-common
• $ sudo apt-add-repository ppa:ansible/ansible
• $ sudo apt-get update
• $ sudo apt-get install ansible
• Install Ansible using pip
• $ sudo pip install ansible
• Github
• $ git clone git://github.com/ansible/ansible.git
• $ cd ./ansible
• $ source ./hacking/env-setup
Note : you need to have passwordless SSH connectivity from the Ansible host to the Oracle
servers
Install Ansible
• Automate a single task on one or more managed nodes. Ad-hoc commands are quick and easy,
but they are not reusable. So why learn about ad-hoc commands first? Ad-hoc commands
demonstrate the simplicity and power of Ansible.
• Ad-hoc commands are great for tasks you repeat rarely. For example, if you want to power off
all the machines in your lab for Christmas vacation, you could execute a quick one-liner in
Ansible without writing a playbook. An ad-hoc command looks like this:
• $ ansible [pattern] -m [module] -a "[module options]“
• Ad-hoc tasks can be used to reboot servers, copy files, manage packages and users, and much
more. You can use any Ansible module in an ad-hoc task
•
Ansible ad-Hoc command line tool
Ansible
Modules
Ansible ad-Hoc
command line
tool Use Cases
Rebooting servers
•I want to reboot all the servers in group called “WebServer” , I have 10 webserver.
•ansible Webserver -a "/sbin/reboot“Rebooting
Managing file
•SCP to transfer many files to multiple machines in parallel.
•ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts"Managing
Managing users and groups
•You can create, manage, and remove user accounts on your managed nodes with ad-hoc
tasks:
•ansible all -m user -a "name=foo password=<crypted password here>"
Managing
• Now that you can run ad-hoc commands, you may be interested in combining multiple
modules to perform more elaborate actions. Instead of putting all commands sequentially into
a bash script, Ansible provides the concept of playbook. A playbook is a YAML formatted file
in which you list the modules sequentially to be executed on a group of hosts. This is an
example:
Ansible PlayBook
Use Ansible to Install RDBMS 19c
Control Server
Ansible
Python
Managed Server
Server#1
Managed Server
Server#2
/etc/ansible/hosts
[Server#1]
192.168.1.1
[Server#2]
192.168.1.2
[dbservers]
192.168.1.1
192.168.1.2
oracle19c_rdbmsinstall.yml
- hosts: dbservers
user: root
roles: -
- dbsoftware19c_install
roles/dbsoftware19c_install/files/Software_installation.r
sp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbi
nstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION={{ oracle_inventory }}
ORACLE_HOME={{ oracle_home }}
ORACLE_BASE={{ oracle_base }}
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=oinstall
oracle.install.db.OSDGDBA_GROUP=oinstall
oracle.install.db.OSKMDBA_GROUP=oinstall
oracle.install.db.OSRACDBA_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
• cd /etc/ansible
• ansible-playbook oracle19c_rdbmsinstall.yml
Error:
ansible
requires a
json
module,
none
found!
This means the python-simplejson rpm is not installed
In our case: to
add the install of
pythonsimplejson
to the playbook
•install python-simplejson rpm
Purpose: run
command without
the need for
python
Resolution: raw
module
Use Ansible to Upgrade
pre_upgrade.yml
Upgrade.yml
Final.ym
l
• Oracle Cloud Infrastructure Ansible Modules Collection Sample
• Compute
• Database
• Object Storage
• Launch a Compute Instance
• Set Up an Autonomous Database
• List Objects and Buckets
• Delete Objects
• OCI Ansible Modules
• Block Volume
• Compute
• Container Engine for Kubernetes
• Database
• File Storage
• IAM
• Load Balancing
Ansible Playbook for OCI
Launch
a Compute Instance
• generates a temporary host-specific
SSH key-pair
• specifies the public key from that
key-pair to connect to the instance
during instance launch and
• demonstrates how the newly
launched instance can be connected
to using SSH.
https://github.com/oracle/oci-ansible-
collection/tree/master/samples/compute/launch_compute_instance
• Set up an Autonomous Database with Autonomous Transaction
Processing.
• List all the Autonomous Transaction Processing instances available
in a compartment, filtered by display name.
• Get the "facts" for a specified database.
• Stop and start an Autonomous Database.
• Delete an Autonomous Database.
Set Up an Autonomous Database
https://github.com/oracle/oci-ansible-
collection/tree/master/samples/database/autonomous_database
Delete
Objects
https://github.com/oracle/oci-ansible-
collection/tree/master/samples/object_storage/delete_objects
Terraform
• Terraform is a tool for building, changing, and
versioning infrastructure safely and
efficiently. Terraform can manage existing and
popular service providers as well as custom in-
house solutions. Configuration files describe
to Terraform the components needed to run a
single application or your entire datacenter.
• Advantages of Terraform
1. Platform Agnostic
2. State Management
3. Operator Confidence
Install Terraform
• Terraform and integrated providers available for all major operating
environments:
• Linux (x86 & ARM)
• FreeBSD (x86 & ARM)
• OpenBSD (x86)
• Windows (x86)
• Mac OS X (x86)
• Solaris (x86)
• Installation
• Download the terraform binary for your OS
• Integrated providers automatically downloaded/installed when needed
• Non-integrated providers: manual download of the binary provider
needed
• Frequent updates advised
• Easy on Oracle Linux 7 (ol7_developer on public yum,
ol7_x86_64_developer on ULN)
• # yum install terraform (Installation)
• # yum upgrade terraform (Upgrade)
Terraform
Commands
• terraform init
• Before initial use or after upgrade
• terraform plan
• terraform apply
• terraform apply –-auto-approve
• terraform destroy
• terraform destroy -force
Terraform Variables
Variables must be defined in a .tf file
values can be assigned
during
definition with « default = »
Variables can be used anywhere in .tf files
Input variables from environment variables
(TF_VAR_name)
$ export TF_VAR_access_key="xxxxxxxx"
$ export TF_VAR_secret_key="xxxxxxxx"
Input variables from
command line
Input variables from one or more files
Default file name is terraform.tfvars
If not default name, just give the name(s) of
file(s)
Terraform Output
Outputs are optional but useful to display
relevant information
public IP randomly assigned (AWS, OCI, OCI-C)
Temporary password for Windows instances in OCI
Outputs are displayed at the end of « terraform
apply » or with « terraform output »
Terraform data-source
Useful to automatically get objects names or IDs
that are needed to create resources
Alternative is to hard-code names/IDs
Examples of data sources within OCI
Get the list of Availability Domains (name different in each
tenant)
Best Practice
• Putting all code in main.tf is a good idea when you are getting started or writing an example
code. In all other cases you will be better having several files split logically like this:
• main.tf - call modules, locals and data-sources to create all resources
• variables.tf - contains declarations of variables used in main.tf
• outputs.tf - contains outputs from the resources created in main.tf
• terraform.tfvars should not be used anywhere except composition.
Example – Single Web Server
main.tf terraform {
required_version = ">= 0.12"
}
# -------------------------------------------------------
# CONFIGURE OUR AWS CONNECTION
# -------------------------------------------------------
provider "aws" {
region = "us-east-2"
}
# ----------------------------
# DEPLOY A SINGLE EC2 INSTANCE
# ----------------------------
resource "aws_instance" "example" {
# Ubuntu Server 18.04 LTS (HVM), SSD Volume Type in
us-east-2
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
vpc_security_group_ids = [aws_security_group.instance.id]
user_data = <<-EOF
#!/bin/bash
echo "Hello, World" > index.html
nohup busybox httpd -f -p "${var.server_port}" &
EOF
tags = {
Name = "terraform-example"
}
}
# ------------------------------------------------------------
# CREATE THE SECURITY GROUP THAT'S APPLIED TO THE
EC2 INSTANCE
resource "aws_security_group" "instance" {
name = "terraform-example-instance"
# Inbound HTTP from anywhere
ingress {
from_port = var.server_port
to_port = var.server_port
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
variable "server_port" {
description = "The port the server will use for
HTTP requests"
type = number
default = 8080
}
outputs.tf
variables.tf
output "public_ip" {
value = aws_instance.example.public_ip
description = "The public IP of the web server"
}
Thank you!
Twitter
@OsamaOracle
My Blog
OsamaOracle.com
LinkedIn
https://jo.linkedin.com/in/osamamustafa

Contenu connexe

Tendances

DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansiblesriram_rajan
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
How Netflix Tunes EC2 Instances for Performance
How Netflix Tunes EC2 Instances for PerformanceHow Netflix Tunes EC2 Instances for Performance
How Netflix Tunes EC2 Instances for PerformanceBrendan Gregg
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks EDB
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in DockerDocker, Inc.
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-in
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-inNews And Development Update Of The CloudStack Tungsten Fabric SDN Plug-in
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-inShapeBlue
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction Robert Reiz
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 

Tendances (20)

DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansible
 
Ansible
AnsibleAnsible
Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
How Netflix Tunes EC2 Instances for Performance
How Netflix Tunes EC2 Instances for PerformanceHow Netflix Tunes EC2 Instances for Performance
How Netflix Tunes EC2 Instances for Performance
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks
 
Jenkins
JenkinsJenkins
Jenkins
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
 
NGINX Plus on AWS
NGINX Plus on AWSNGINX Plus on AWS
NGINX Plus on AWS
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-in
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-inNews And Development Update Of The CloudStack Tungsten Fabric SDN Plug-in
News And Development Update Of The CloudStack Tungsten Fabric SDN Plug-in
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 

Similaire à DevOps for databases made easy

Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdfNigussMehari4
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonMyNOG
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Alex S
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleJeff Potts
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Ansible a tool for dev ops
Ansible a tool for dev opsAnsible a tool for dev ops
Ansible a tool for dev opsRené Ribaud
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with ociDonghuKIM2
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftYaniv cohen
 
Declarative Infrastructure Tools
Declarative Infrastructure Tools Declarative Infrastructure Tools
Declarative Infrastructure Tools Yulia Shcherbachova
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides InfinityPP
 
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)M Malai
 
Ansible is Our Wishbone
Ansible is Our WishboneAnsible is Our Wishbone
Ansible is Our WishboneMydbops
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modulesmohamedmoharam
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 

Similaire à DevOps for databases made easy (20)

Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
ansible_rhel.pdf
ansible_rhel.pdfansible_rhel.pdf
ansible_rhel.pdf
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Ansible.pdf
Ansible.pdfAnsible.pdf
Ansible.pdf
 
Ansible a tool for dev ops
Ansible a tool for dev opsAnsible a tool for dev ops
Ansible a tool for dev ops
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
Ansible
AnsibleAnsible
Ansible
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Declarative Infrastructure Tools
Declarative Infrastructure Tools Declarative Infrastructure Tools
Declarative Infrastructure Tools
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
 
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
 
Ansible is Our Wishbone
Ansible is Our WishboneAnsible is Our Wishbone
Ansible is Our Wishbone
 
Avoid boring work_v2
Avoid boring work_v2Avoid boring work_v2
Avoid boring work_v2
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 

Plus de Osama Mustafa

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architectOsama Mustafa
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dbaOsama Mustafa
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your codeOsama Mustafa
 
Java business service
Java business serviceJava business service
Java business serviceOsama Mustafa
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_servicesOsama Mustafa
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerOsama Mustafa
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOsama Mustafa
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...Osama Mustafa
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dbaOsama Mustafa
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Osama Mustafa
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2Osama Mustafa
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Osama Mustafa
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaOsama Mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Osama Mustafa
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vaultOsama Mustafa
 

Plus de Osama Mustafa (20)

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architect
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
DevOps Project
DevOps Project DevOps Project
DevOps Project
 
Java business service
Java business serviceJava business service
Java business service
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_services
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single node
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...
 
Weblogic and docker
Weblogic and dockerWeblogic and docker
Weblogic and docker
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

DevOps for databases made easy

  • 2. About me oFounder/CEO for Gurus Solutions oLeader & Director for JAOUG oOracle ACE Director o6x of OCI, 4x AWS and 5x Azure oAutomation Lover oStart as DBA and still working on different Of Databases. o Author of two books and working on my 3rd one. oPresenter & Contributor in Oracle Community oPublished articles in different magazines oBlogger on osamaoracle.com
  • 4. Agenda Questions & Answers. Automation Examples. How DevOps will make DBA life Easier ? Understand the DevOps ? What , Why , When ?
  • 5. DevOps is a software development method that stresses communication, collaboration, integration, automation and measurement of cooperation between software developers and other IT professionals. DevOps is sometimes treated as a concept, a philosophy, a job role or a set of tools. DevOps is not all about automation, but it enables fast feedback loops and encourages a culture of collaboration
  • 8. Why DevOps ? 1. Speed deployment processes 2. Enable fast response to changing business requirements 3. Reduce the risk of production changes causing outages 4. Break down silos
  • 10. • When a task becomes (extremely) repetitive. • The Task will take so much manual work. • The task output either will be too much or less. • Some other reason why to use DevOps :- • Eliminate human interaction. • Errors, things not able to work. • Differences in paths • Differences in settings Why DevOps With Oracle - Problem
  • 11. • Terraform • Ansible • Jenkins • Puppet • Chef • Salt Oracle Using DevOps – Tools Examples
  • 12. Tools How it work Focusing Terraform Agentless Admin Focused , IAAC Ansible agentless Admin Focused , Configuration Management Jenkins Agentless Dev and can be work for admin also, CI/CD Puppet agent based Dev Focused Chef agent based Dev Focused Salt Agent, Agentless Admin Focused
  • 13.
  • 15. • Agentless: Ansible doesn’t require agents to be installed on your target servers. Instead, it connects through the secured SSH protocol to execute its tasks. • Facts: Facts are a set of variables that Ansible will collect on target hosts at run time. Those variables are then usable within your scripts. Facts are almost all information you may need from a target host like the IPs, NICs, Devices, etc. You can even add your fact like the list of Oracle instance running with their Oracle Home for example. Two levels: • You can use the so-called ad-hoc command line tool. This tool will permit you with one command line to execute actions, like creating OS users, on multiple servers. • Then you may want to script a set of operations. For that purpose, you’ll use Playbook. A playbook is a file contention your sequence of operations in a YAML format.
  • 16. • RHEL/CentOS Linux • $ sudo yum install ansible • Debian/Ubuntu Linux • $ sudo apt-get install software-properties-common • $ sudo apt-add-repository ppa:ansible/ansible • $ sudo apt-get update • $ sudo apt-get install ansible • Install Ansible using pip • $ sudo pip install ansible • Github • $ git clone git://github.com/ansible/ansible.git • $ cd ./ansible • $ source ./hacking/env-setup Note : you need to have passwordless SSH connectivity from the Ansible host to the Oracle servers Install Ansible
  • 17. • Automate a single task on one or more managed nodes. Ad-hoc commands are quick and easy, but they are not reusable. So why learn about ad-hoc commands first? Ad-hoc commands demonstrate the simplicity and power of Ansible. • Ad-hoc commands are great for tasks you repeat rarely. For example, if you want to power off all the machines in your lab for Christmas vacation, you could execute a quick one-liner in Ansible without writing a playbook. An ad-hoc command looks like this: • $ ansible [pattern] -m [module] -a "[module options]“ • Ad-hoc tasks can be used to reboot servers, copy files, manage packages and users, and much more. You can use any Ansible module in an ad-hoc task • Ansible ad-Hoc command line tool Ansible Modules
  • 18. Ansible ad-Hoc command line tool Use Cases Rebooting servers •I want to reboot all the servers in group called “WebServer” , I have 10 webserver. •ansible Webserver -a "/sbin/reboot“Rebooting Managing file •SCP to transfer many files to multiple machines in parallel. •ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts"Managing Managing users and groups •You can create, manage, and remove user accounts on your managed nodes with ad-hoc tasks: •ansible all -m user -a "name=foo password=<crypted password here>" Managing
  • 19. • Now that you can run ad-hoc commands, you may be interested in combining multiple modules to perform more elaborate actions. Instead of putting all commands sequentially into a bash script, Ansible provides the concept of playbook. A playbook is a YAML formatted file in which you list the modules sequentially to be executed on a group of hosts. This is an example: Ansible PlayBook
  • 20. Use Ansible to Install RDBMS 19c Control Server Ansible Python Managed Server Server#1 Managed Server Server#2 /etc/ansible/hosts [Server#1] 192.168.1.1 [Server#2] 192.168.1.2 [dbservers] 192.168.1.1 192.168.1.2 oracle19c_rdbmsinstall.yml - hosts: dbservers user: root roles: - - dbsoftware19c_install
  • 21. roles/dbsoftware19c_install/files/Software_installation.r sp oracle.install.responseFileVersion=/oracle/install/rspfmt_dbi nstall_response_schema_v19.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION={{ oracle_inventory }} ORACLE_HOME={{ oracle_home }} ORACLE_BASE={{ oracle_base }} oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=oinstall oracle.install.db.OSDGDBA_GROUP=oinstall oracle.install.db.OSKMDBA_GROUP=oinstall oracle.install.db.OSRACDBA_GROUP=dba SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true oracle.installer.autoupdates.option=SKIP_UPDATES
  • 22. • cd /etc/ansible • ansible-playbook oracle19c_rdbmsinstall.yml
  • 23. Error: ansible requires a json module, none found! This means the python-simplejson rpm is not installed In our case: to add the install of pythonsimplejson to the playbook •install python-simplejson rpm Purpose: run command without the need for python Resolution: raw module
  • 24. Use Ansible to Upgrade pre_upgrade.yml Upgrade.yml Final.ym l
  • 25. • Oracle Cloud Infrastructure Ansible Modules Collection Sample • Compute • Database • Object Storage • Launch a Compute Instance • Set Up an Autonomous Database • List Objects and Buckets • Delete Objects • OCI Ansible Modules • Block Volume • Compute • Container Engine for Kubernetes • Database • File Storage • IAM • Load Balancing Ansible Playbook for OCI
  • 26. Launch a Compute Instance • generates a temporary host-specific SSH key-pair • specifies the public key from that key-pair to connect to the instance during instance launch and • demonstrates how the newly launched instance can be connected to using SSH. https://github.com/oracle/oci-ansible- collection/tree/master/samples/compute/launch_compute_instance
  • 27. • Set up an Autonomous Database with Autonomous Transaction Processing. • List all the Autonomous Transaction Processing instances available in a compartment, filtered by display name. • Get the "facts" for a specified database. • Stop and start an Autonomous Database. • Delete an Autonomous Database. Set Up an Autonomous Database https://github.com/oracle/oci-ansible- collection/tree/master/samples/database/autonomous_database
  • 29. Terraform • Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in- house solutions. Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. • Advantages of Terraform 1. Platform Agnostic 2. State Management 3. Operator Confidence
  • 30. Install Terraform • Terraform and integrated providers available for all major operating environments: • Linux (x86 & ARM) • FreeBSD (x86 & ARM) • OpenBSD (x86) • Windows (x86) • Mac OS X (x86) • Solaris (x86) • Installation • Download the terraform binary for your OS • Integrated providers automatically downloaded/installed when needed • Non-integrated providers: manual download of the binary provider needed • Frequent updates advised • Easy on Oracle Linux 7 (ol7_developer on public yum, ol7_x86_64_developer on ULN) • # yum install terraform (Installation) • # yum upgrade terraform (Upgrade)
  • 31. Terraform Commands • terraform init • Before initial use or after upgrade • terraform plan • terraform apply • terraform apply –-auto-approve • terraform destroy • terraform destroy -force
  • 32. Terraform Variables Variables must be defined in a .tf file values can be assigned during definition with « default = » Variables can be used anywhere in .tf files Input variables from environment variables (TF_VAR_name) $ export TF_VAR_access_key="xxxxxxxx" $ export TF_VAR_secret_key="xxxxxxxx" Input variables from command line Input variables from one or more files Default file name is terraform.tfvars If not default name, just give the name(s) of file(s)
  • 33. Terraform Output Outputs are optional but useful to display relevant information public IP randomly assigned (AWS, OCI, OCI-C) Temporary password for Windows instances in OCI Outputs are displayed at the end of « terraform apply » or with « terraform output »
  • 34. Terraform data-source Useful to automatically get objects names or IDs that are needed to create resources Alternative is to hard-code names/IDs Examples of data sources within OCI Get the list of Availability Domains (name different in each tenant)
  • 35. Best Practice • Putting all code in main.tf is a good idea when you are getting started or writing an example code. In all other cases you will be better having several files split logically like this: • main.tf - call modules, locals and data-sources to create all resources • variables.tf - contains declarations of variables used in main.tf • outputs.tf - contains outputs from the resources created in main.tf • terraform.tfvars should not be used anywhere except composition.
  • 36. Example – Single Web Server main.tf terraform { required_version = ">= 0.12" } # ------------------------------------------------------- # CONFIGURE OUR AWS CONNECTION # ------------------------------------------------------- provider "aws" { region = "us-east-2" } # ---------------------------- # DEPLOY A SINGLE EC2 INSTANCE # ---------------------------- resource "aws_instance" "example" { # Ubuntu Server 18.04 LTS (HVM), SSD Volume Type in us-east-2 ami = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" vpc_security_group_ids = [aws_security_group.instance.id] user_data = <<-EOF #!/bin/bash echo "Hello, World" > index.html nohup busybox httpd -f -p "${var.server_port}" & EOF tags = { Name = "terraform-example" } } # ------------------------------------------------------------ # CREATE THE SECURITY GROUP THAT'S APPLIED TO THE EC2 INSTANCE resource "aws_security_group" "instance" { name = "terraform-example-instance" # Inbound HTTP from anywhere ingress { from_port = var.server_port to_port = var.server_port protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } }
  • 37. variable "server_port" { description = "The port the server will use for HTTP requests" type = number default = 8080 } outputs.tf variables.tf output "public_ip" { value = aws_instance.example.public_ip description = "The public IP of the web server" }
  • 38.