BRUNO REIS
LUXOUG at OOW19. Have you missed the Oracle Open World 2019?
Category: Database Author: BRUNO REIS Date: 5 years ago Comments: 0

LUXOUG at OOW19 - Have you missed the Oracle Open World 2019?

Fernando Simon’s article about the new Exadata: http://www.fernandosimon.com/blog/exadata-x8m/
Download presentations:https://events.rainfocus.com/widget/oracle/oow19/catalogow19?
 
Bruno Reis

 


Oracle Autonomous Database and DevOps: A Simple Approach to Utilization – Part 5
Category: Cloud Author: BRUNO REIS Date: 5 years ago Comments: 0

Oracle Autonomous Database and DevOps: A Simple Approach to Utilization - Part 5

This article is the fifth and final part of the Oracle Autonomous Database and DevOps article series. For a better understanding, I recommend to read the articles “Oracle Autonomous Database and DevOps: A Simple Approach to Use – Part 1”, “Part 2”, “Part 3” and “Part 4” before proceeding with the steps in this article.

 

As the previous article dealt with the creation of the Linux application server within Oracle Cloud, in this article we will proceed with the creation of microservices using Docker and connecting a JAVA application to the cloud database. To start let’s get some concepts:

 

 

What are microservices?

 

According to Chris Richardson, “is a style of architecture that structures an application as a collection of services that are:

 

  • Highly sustainable and testable
  • Frankly coupled
  • Independently deployable
  • Organized around business resources. ”
 
What is node.js?

 

According to the manufacturer’s official website, “Node.js is an open source, cross-platform JavaScript execution environment.”

 

PS: This article will not show the coding of the application, but only the loading of it.

 

Now that we have a brief description of micricroservices and node.js, let’s proceed with the creation of our microservices:
 
 
Creating node.js microservices: Make sure Docker is running on your machine (For more information on Docker see the first article of this series):

 

[root@techdatatechdatabasketblogblog /]# systemctl status  docker
  • docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)

   Active: active (running) since Wed 2019-04-24 20:03:28 CEST; 7s ago

     Docs: http://docs.docker.com

 Main PID: 27946 (dockerd-current)

    Tasks: 20

   CGroup: /system.slice/docker.service

           ├─27946 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=...

           └─27952 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/co...




Apr 24 20:03:27 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:27.250219328+02:00" level=warning msg="failed to cleanup ipc mounts:\nfailed to umount /var/lib/docker/co...id argument"

Apr 24 20:03:27 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:27.250885514+02:00" level=warning msg="8172d6ebc0303d372883143207467260cd2ea708b300ba23c736b36777be0d3b c...id argument"

Apr 24 20:03:27 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:27.350320351+02:00" level=info msg="Firewalld running: true"

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.063094521+02:00" level=info msg="Removing stale sandbox f98e8fe2671acc61090bbed5f985266ded27adf2e19e27...6777be0d3b)"

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.466076919+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16... IP address"

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.627644418+02:00" level=info msg="Loading containers: done."

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.687620173+02:00" level=info msg="Daemon has completed initialization"

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.687645914+02:00" level=info msg="Docker daemon" commit="8633870/1.13.1" graphdriver=overlay2 version=1.13.1

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com dockerd-current[27946]: time="2019-04-24T20:03:28.691636427+02:00" level=info msg="API listen on /var/run/docker.sock"

Apr 24 20:03:28 techdatatechdatabasketblogblog.tech.com systemd[1]: Started Docker Application Container Engine.

 

 

At this moment you can pull your app image at https://github.com  as in the example below:







[root@oc8226237722 /]# git clone https://github.com/brunors/appte.git  ((link will not be available after  this article is published))




Cloning into 'appte'...

remote: Enumerating objects: 1045, done.

remote: Total 1045 (delta 0), reused 0 (delta 0), pack-reused 1045

Receiving objects: 100% (1045/1045), 3.49 MiB | 1.95 MiB/s, done.

Resolving deltas: 100% (173/173), done.




Open the port on your computer for the application to start. As we chose in the previous article will be port 3055:




[root@techdatabasketblog /]# firewall-cmd --zone=public --permanent --add-port=3055/tcp

success

 

 

Install Oracle Client on your computer, you can find it on the OTN website and download it:

 

 

Copy the wallet used in previous articles to create the secure connection to a directory that will be used for the container image:
 
[root@techdatabasketblog wallet_APPtechdatabasket]# unzip /tmp/wallet/Wallet_techdatabasket.zip -d /wallet_APPtechdatabasket/

Archive:  /tmp/wallet/Wallet_techdatabasket.zip

  inflating: /wallet_APPtechdatabasket/cwallet.sso 

  inflating: /wallet_APPtechdatabasket/tnsnames.ora 

  inflating: /wallet_APPtechdatabasket/truststore.jks 

  inflating: /wallet_APPtechdatabasket/ojdbc.properties 

  inflating: /wallet_APPtechdatabasket/sqlnet.ora 

  inflating: /wallet_APPtechdatabasket/ewallet.p12 

  inflating: /wallet_APPtechdatabasket/keystore.jks 

[root@techdatabasketblog wallet_APPtechdatabasket]#


Change the sqlnet.ora values ​​to:

 

WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA =

(DIRECTORY=$TNS_ADMIN)))

 

Be in the directory containing the wallet, the Oracle Client and start Docker with the image name (in this article  is appte):

 

$ docker build -t appte   .




Check the image:

 

[root@techdatabasketblog]# docker images -a

REPOSITORY                                      TAG                 IMAGE ID            CREATED             SIZE

<none>                                          <none>              d9369bacadb8        14 minutes ago      562 MB

<none>                                          <none>              d9d8bb9b0d49        14 minutes ago      562 MB

<none>                                          <none>              7e7286d50f76        14 minutes ago      550 MB

<none>                                          <none>              6746bf7618ac        14 minutes ago      173 MB

<none>                                          <none>              6c6022e9f288        14 minutes ago      110 MB

<none>                                          <none>              05c85eda1ac8        14 minutes ago      110 MB

<none>                                          <none>              6c628092a5a8        14 minutes ago      110 MB

<none>                                          <none>              f24dfd98c67a        15 minutes ago      14.9 MB

appte                                           latest              65463ysdbe26       3 weeks ago         171 MB

 

 

Start the image on port 3055 as we chose:

 

docker run -i -p 3055:3055 -t appte  sh

/ #

 

Change your user credentials, password and connection string in the application.

 

Run the server.js script:

 

node server.js &

 

The results will be something like this:

 

appte listening on port 3055




You can see your application in a web browser as http://{SEUIP}:3055

 

 

Now that we have created the  microservices, let’s make a connection of a JAVA application to the ATP:

 

Connect to the provisioned server and as root install java:

 

[root@techdatabasketblog ATPDocker]# ssh [email protected]

Enter passphrase for key '/root/.ssh/id_rsa':

Please login as the user "opc" rather than the user "root".




Connection to 129.146.128.2 closed.

[root@techdatabasketblog ATPDocker]# ssh [email protected]

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

[root@techdatabasketblog ATPDocker]# ssh [email protected]

Enter passphrase for key '/root/.ssh/id_rsa':

Enter passphrase for key '/root/.ssh/id_rsa':

Last login: Wed Apr 24 19:27:11 2019 from ua-85-226-141-154.bbcust.telenor.se

[opc@vmlinuxmachine ~]$ su - root

[root@vmlinuxmachine ~]#yum install java




 

Loaded plugins: langpacks, ulninfo

ol7_UEKR5                                                                                                                                                                            | 2.5 kB  00:00:00    

ol7_addons                                                                                                                                                                           | 2.5 kB  00:00:00    

ol7_developer                                                                                                                                                                        | 2.5 kB  00:00:00    

ol7_developer_EPEL                                                                                                                                                                   | 2.5 kB  00:00:00    

ol7_ksplice                                                                                                                                                                          | 2.5 kB  00:00:00    

ol7_latest                                                                                                                                                                           | 3.0 kB  00:00:00    

ol7_optional_latest                                                                                                                                                                  | 2.5 kB  00:00:00    

ol7_software_collections                                                                                                                                                             | 2.5 kB  00:00:00    

(1/6): ol7_ksplice/primary_db                                                                                                                                                        | 131 kB  00:00:00    

(2/6): ol7_optional_latest/x86_64/updateinfo                                                                                                                                         | 688 kB  00:00:00    

(3/6): ol7_latest/x86_64/updateinfo                                                                                                                                                  | 899 kB  00:00:00    

(4/6): ol7_developer_EPEL/x86_64/primary_db                                                                                                                                          |  10 MB  00:00:00    

(5/6): ol7_latest/x86_64/primary_db                                                                                                                                                  |  16 MB  00:00:00    

(6/6): ol7_optional_latest/x86_64/primary_db                                                                                                                                         | 3.5 MB  00:00:00    

Resolving Dependencies

--> Running transaction check












Installed:

  java-1.8.0-openjdk.x86_64 1:1.8.0.212.b04-0.el7_6                                                                                                                                                         




Dependency Installed:

  alsa-lib.x86_64 0:1.1.6-2.el7                 atk.x86_64 0:2.28.1-1.el7                         avahi-libs.x86_64 0:0.6.31-19.el7                             cairo.x86_64 0:1.15.12-3.el7               

  copy-jdk-configs.noarch 0:3.3-10.el7_5        cups-libs.x86_64 1:1.6.3-35.el7                   dejavu-fonts-common.noarch 0:2.33-6.el7                       dejavu-sans-fonts.noarch 0:2.33-6.el7      

  fontconfig.x86_64 0:2.13.0-4.3.el7            fribidi.x86_64 0:1.0.2-1.el7                      gdk-pixbuf2.x86_64 0:2.36.12-3.el7                            giflib.x86_64 0:4.1.6-9.el7                

  graphite2.x86_64 0:1.3.10-1.el7_3             gtk-update-icon-cache.x86_64 0:3.22.30-3.el7      gtk2.x86_64 0:2.24.31-1.el7                                   harfbuzz.x86_64 0:1.7.5-2.el7              

  hicolor-icon-theme.noarch 0:0.12-7.el7        jasper-libs.x86_64 0:1.900.1-33.el7               java-1.8.0-openjdk-headless.x86_64 1:1.8.0.212.b04-0.el7_6    javapackages-tools.noarch 0:3.4.1-11.el7   

  jbigkit-libs.x86_64 0:2.0-11.el7              libICE.x86_64 0:1.0.9-9.el7                       libSM.x86_64 0:1.2.2-2.el7                                    libX11.x86_64 0:1.6.5-2.el7                

  libX11-common.noarch 0:1.6.5-2.el7            libXau.x86_64 0:1.0.8-2.1.el7                     libXcomposite.x86_64 0:0.4.4-4.1.el7                          libXcursor.x86_64 0:1.1.15-1.el7           

  libXdamage.x86_64 0:1.1.4-4.1.el7             libXext.x86_64 0:1.3.3-3.el7                      libXfixes.x86_64 0:5.0.3-1.el7                                libXft.x86_64 0:2.3.2-2.el7                

  libXi.x86_64 0:1.7.9-1.el7                    libXinerama.x86_64 0:1.1.3-2.1.el7                libXrandr.x86_64 0:1.5.1-2.el7                                libXrender.x86_64 0:0.9.10-1.el7           

  libXtst.x86_64 0:1.2.3-1.el7                  libXxf86vm.x86_64 0:1.1.4-1.el7                   libdrm.x86_64 0:2.4.91-3.el7                                  libfontenc.x86_64 0:1.1.3-3.el7            

  libglvnd.x86_64 1:1.0.1-0.8.git5baa1e5.el7    libglvnd-egl.x86_64 1:1.0.1-0.8.git5baa1e5.el7    libglvnd-glx.x86_64 1:1.0.1-0.8.git5baa1e5.el7                libjpeg-turbo.x86_64 0:1.2.90-6.el7        

  libpciaccess.x86_64 0:0.14-1.el7              libthai.x86_64 0:0.1.14-9.el7                     libtiff.x86_64 0:4.0.3-27.el7_3                               libwayland-client.x86_64 0:1.15.0-1.el7    

  libwayland-server.x86_64 0:1.15.0-1.el7       libxcb.x86_64 0:1.13-1.el7                        libxshmfence.x86_64 0:1.2-1.el7                               libxslt.x86_64 0:1.1.28-5.0.1.el7          

  lksctp-tools.x86_64 0:1.0.17-2.el7            mesa-libEGL.x86_64 0:18.0.5-4.el7_6               mesa-libGL.x86_64 0:18.0.5-4.el7_6                            mesa-libgbm.x86_64 0:18.0.5-4.el7_6        

  mesa-libglapi.x86_64 0:18.0.5-4.el7_6         pango.x86_64 0:1.42.4-2.el7_6                     pcsc-lite-libs.x86_64 0:1.8.8-8.el7                           python-javapackages.noarch 0:3.4.1-11.el7  

  python-lxml.x86_64 0:3.2.1-4.el7              ttmkfdir.x86_64 0:3.0.9-42.el7                    tzdata-java.noarch 0:2019a-1.el7                              xorg-x11-font-utils.x86_64 1:7.5-21.el7    

  xorg-x11-fonts-Type1.noarch 0:7.5-9.el7     




Complete!

 

 

Create a directory and copy the application:

 

cd ~




[root@vmlinuxmachine opc]# mkdir javaBLOG




[root@vmlinuxmachine opc]# git clone  https://github.com/brunors/appte.git/javaBLOG.git





 

 

Download and install JDBC drives in your provisioned environment:

 

[root@vmlinuxmachine lib]# tar xzfv ojdbc8-full.tar.gz

ojdbc8-full/

ojdbc8-full/ojdbc8.jar

ojdbc8-full/oraclepki.jar

ojdbc8-full/osdt_core.jar

ojdbc8-full/xdb6.jar

ojdbc8-full/ons.jar

ojdbc8-full/ojdbc.policy

ojdbc8-full/orai18n.jar

ojdbc8-full/osdt_cert.jar

ojdbc8-full/README.txt

ojdbc8-full/ucp.jar

ojdbc8-full/simplefan.jar

 

 

 

[root@techdatabasketblog]# sudo ssh -i /path_to/sshkeys/id_rsa [email protected]

Enter passphrase for key '/root/.ssh/id_rsa':

[opc@vmlinuxmachine ~]$ cd javaBLOG

[opc@vmlinuxmachine javaBLOG]$

 
Copy and unzip your database wallet to the application directory on the server:
 

 

[opc@vmlinuxmachine ~]$unzip /tmp/wallet/Wallet_techdatabasket.zip -d /wallet_APPtechdatabasket/

Archive:  /tmp/wallet/Wallet_techdatabasket.zip

  inflating: /wallet_APPtechdatabasket/cwallet.sso 

  inflating: /wallet_APPtechdatabasket/tnsnames.ora 

  inflating: /wallet_APPtechdatabasket/truststore.jks 

  inflating: /wallet_APPtechdatabasket/ojdbc.properties 

  inflating: /wallet_APPtechdatabasket/sqlnet.ora 

  inflating: /wallet_APPtechdatabasket/ewallet.p12 

  inflating: /wallet_APPtechdatabasket/keystore.jks 

[root@techdatabasketblog wallet_APPtechdatabasket]#

 
Change the sqlnet.ora file values ​​to the following:
 
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY=$TNS_ADMIN)))

SSL_SERVER_DN_MATCH=yes

 
Set the TNS_ADMIN variable to the wallet path:
 
export TNS_ADMIN=/home/opc/javaBLOG

 
 
Compile the java application:

 

cd /home/opc/javaBLOG/src

 

 Execute the java application and connect to the ATP database:

 

java -cp .:/home/opc/javaBLOG/lib/ojdbc8-full/ojdbc8.jar javaAPP

 

This finished  the series of articles on the simple approach of Oracle Autonomous Database and DevOps. The idea for this series of articles came from my participation in Oracle Code Rome 2019 in Italy, where I got a lot of knowledge that made me explore this DevOps field further with the ATP database and as mentioned in the first article we started with the Docker setup and later in the following articles on Oracle Cloud database and server provisioning on Oracle Cloud and we end with a brief representation of microservices and java with the ATP database. However, there are a number of features that can still be explored within Oracle Cloud, so create your account and explore the Oracle Cloud world.

 

 

References:
 
https://www.oracle.com/technetwork/database/availability/trn5515-microserviceswithoracle-5187372.pdf
 
https://microservices.io/
https://nodejs.dev/
 
https://blogs.oracle.com/dbcs/building-microservices-on-oracle-autonomous-transaction-processing-service-v2
 
https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
 
https://github.com/cloudsolutionhubs
 
https://www.oracle.com/technetwork/database/application-development/jdbc/documentation/atp-5073445.html
 
https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/apaas/java/getting-started-java-accs/getting-started-java-accs.html

 

 

Bruno Reis da Silva is a Database Cloud Support Engineer and professionally Certified Oracle Database Administrator who has worked on the South American continent and is now working on the European continent. He was awarded the first Oracle Ace Associate of Hungary in 2017. His interests are in RDBMS, mainly Oracle, operating systems (Linux, AIX, HPUX and Solaris) and High Availability Solutions implementations. In his free time he enjoys playing sports , going to the gym and traveling. His blog www.techdatabasket.com is dedicated to his sister Laura Vitoria and the main reason for blogging is because he believes in the quote “giving back to get back” . He also enjoys continuous learning and the interaction with others who share his interest.

 

Carlos Magno de Andrade Júnior is an  Database Architect at eProseed Europe, with more than 15 years of experience in Oracle database on complex projects in countries such as Brazil , India , the Netherlands, Luxembourg , France and Italy, having worked in companies such as Oracle Corporation, IBM, HSBC, among others. Also share information on your blog ezdba.wordpress.com. Certifications : OCM 12c OCP 10g , 11g OCP , OCP 12c, OCE RAC , Exadata , ITIL and OEM 12c Cloud Control Implementation Specialist.


Oracle Autonomous Database and DevOps: A Simple Usage Approach – Part 4
Category: Cloud Author: BRUNO REIS Date: 5 years ago Comments: 0

Oracle Autonomous Database and DevOps:
A Simple Usage Approach - Part 4

 
 
This article is the fourth part of the series of articles on Oracle Autonomous Database and DevOps. For a better understanding, I recommend reading the “Oracle Autonomous Database and DevOps: A Simple Usability Approach – Part 1”, “Part 2” and “Part 3” articles before proceeding with the steps in this article.
 
As in the previous article we treated the secure connection of the ATP instance with Oracle SQL Developer using the wallet file of the provisioned instance, in this article we will proceed with the creation of the Linux application server. An interesting factor in this topic is that the Linux server will be created within the Oracle Cloud and thus showing the versatility of the Oracle Cloud. To start let’s build some concepts:
 
Why create the Virtual Cloud Network?
 
According  to Oracle Corp., “Before you start an instance, you must have a virtual cloud network (VCN) and a subnet to start it. A subnet is a subdivision of your VCN. The subnet directs the traffic according to the route table. “.
 
Therefore, follow these steps:
 
 – Creating the virtual network (Virtual Cloud Network): In the Oracle Cloud menu click on “Networking” and later “Virtual Cloud Network”:
In the Virtual Cloud Networks tab click on the “Create Virtual Cloud Network” button
You will then be presented with the screen to create the Virtual Cloud Network, where it is necessary to specify all the information for the VNC configuration:
In the Virtual Cloud Network tab choose the option “Create Virtual Cloud Network plus related resources” to create the VNC only with public subnets:
Click the “Create Virtual Cloud Network” button and a screen with confirmation of creation will be displayed:
Thus it will be possible to verify the VCN created:
Click the name of the VCN, in the case of the example of this article “VirtualCloud”.
Then click on “Security Lists” in the menu:
Click “Default Security Lists for VirtualCloud”
On the next screen click on “Edit All Rules”: “
Afterwards, under the “Ingress Rule 3” tab, click the “Another Ingress Rule”
In the next Ingress Rule add the following data:
   Source CIDR : 0.0.0.0/0
    Destination Port Range : 3055 (just an example)
After entering the information click on “Save Security List Rules”:
With the Virtual Cloud Network configured, we will proceed with the provisioning of the Linux machine.
Provisioning the Linux server: In the initial menu of Oracle Cloud click on “Compute” and later on “Instances”:
On the next tab, click the “Create Instance” button:
In the Create Compute Instance tab, provide the requested information:
 
Name: Choose a name for your instance. (In the example: VMLINUXmachine)
 
Select an available domain for your instance: Choose the first available domain (In the example: ysjg: PHX-AD-1)
 
Choose an operating system or image source: Keep the option available from Oracle.
Image Operating System: Oracle Linux 7.6
Choose instance type: Choose “Virtual Machine”
Shape: We will use the option “VM.Standard2.1”
Image Version: Please select the latest version, 2018.09.25-0 (latest)
Configure boot volume: Keep the default option.
SSH Keys: Because Linux operating systems use SSH keys for authentication, you must provide a public key. Click “Choose SSH key file” and provide a public SSH key.
Then click on the “create” button:
While the server is being provisioned, the status displayed will be “Provisioning”:
Once the process is finished, the status is changed to “RUNNING”:
An interesting fact is that from this moment it is already possible to make ssh connection with the created server:

 

 

[root@techdatabasketblog /]# ssh 129.146.128.2

The authenticity of host '129.146.128.2 (129.146.128.2)' can't be established.

ECDSA key fingerprint is SHA256:kuM9EKvzZ47/2qof0kVZc9+po3tDjTEPdsCXVgye9BI.

ECDSA key fingerprint is MD5:84:06:1b:75:2c:5a:f4:72:db:49:ab:7e:b1:5c:5a:67.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '129.146.128.2' (ECDSA) to the list of known hosts.

Enter passphrase for key '/root/.ssh/id_rsa':

Please login as the user "opc" rather than the user "root".




Connection to 129.146.128.2 closed.

[root@techdatabasketblog /]# ssh [email protected]

Enter passphrase for key '/root/.ssh/id_rsa':




[opc@vmlinuxmachine ~]$ hostname

vmlinuxmachine




[opc@vmlinuxmachine ~]$ uname -a

Linux vmlinuxmachine 4.14.35-1844.3.2.el7uek.x86_64 #2 SMP Mon Feb 25 17:43:37 PST 2019 x86_64 x86_64 x86_64 GNU/Linux




[opc@vmlinuxmachine ~]$ date

Tue Apr 23 11:03:45 GMT 2019

[opc@vmlinuxmachine ~]$

 

So we finished the fourth part of the series of articles about Oracle Autonomous Database in Oracle Cloud for DevOps. In the next article we will continue to create microservices using Docker and the connection of a JAVA application with the database created in the cloud.
 
References:
 
https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/creatingnetwork.htm
 
https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/compute-iaas/creating_an_instance_using_the_web_console/creating_an_instance_using_the_web_console.html

 

 

Bruno Reis da Silva is a Database Cloud Support Engineer and professionally Certified Oracle Database Administrator who has worked on the South American continent and is now working at the European continent. He was awarded the first Oracle Ace Associate of Hungary in 2017. His interests are in RDBMS, mainly Oracle, operating systems (Linux, AIX, HPUX and Solaris) and High Availability Solutions implementations. In his free time he enjoys playing sports , going to the gym and traveling. His blog www.techdatabasket.com is dedicated to his sister Laura Vitoria and the main reason for blogging is because he believes in the quote “giving back to get back” . He also enjoys continuous learning and the interaction with others who share his interest.

 

 

Carlos Magno de Andrade Júnior is an  Database Architect at eProseed Europe, with more than 15 years of experience in Oracle database on complex projects in countries such as Brazil , India , the Netherlands, Luxembourg , France and Italy, having worked in companies such as Oracle Corporation, IBM, HSBC, among others. Also shares information on his blog ezdba.wordpress.com. Certifications : OCM 12c OCP 10g , 11g OCP , OCP 12c, OCE RAC , Exadata , ITIL and OEM 12c Cloud Control Implementation Specialist.


Oracle Autonomous Database and DevOps: A Simple Usage Approach – Part 3
Category: Cloud Author: BRUNO REIS Date: 5 years ago Comments: 0

Oracle Autonomous Database and DevOps: A Simple Usage Approach - Part 3

This article is the third part of the series of articles on Oracle Autonomous Database and DevOps. For a better understanding, I recommend reading the articles “Oracle Autonomous Database and DevOps: A Simple Usage Approach – Part 1” and “Oracle Autonomous Database and DevOps: A Simple Usage Approach – Part 2” before proceeding with the steps of this article.
As in the previous article the provisioning of the Oracle Autonomous Database version 18c in the Oracle Cloud was discussed, in this article we will proceed with the use of the database wallet file created to make a secure connection to the provisioned instance and later the first tests with Oracle SQL Developer. However, before starting, let’s build some concepts:
What is Oracle SQL Developer?

 

            According Oracle Corp., “… It is a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud deployments. SQL Developer offers complete end-to-end development of your PL/SQL applications, a worksheet for running queries and scripts, a DBA console for managing the database, a report interface, a complete data modeling solution, and a migration platform for moving your 3rd party databases to Oracle. ” “

 

            Now that you have a brief understanding of what Oracle SQL Developer is, let’s start using the wallet file from the provisioned database and thus establishing a secure connection. To do this, follow these steps:
 
– Use of the wallet file of the provisioned database: In the Oracle Cloud menu click the option Autonomous Transaction Processing (last option in the figure below):
In the next menu, click the name of the provisioned instance. As mentioned in the previous article, the provisioned instance was called techdatabasketinstance:
In the next menu, click the name of the provisioned instance. As mentioned in the previous article, the provisioned instance was called techdatabasketinstance:
After that you can download the wallet file by clicking the “Download” button:
Before starting the download you will be asked to create a password to access the wallet file in the future:
 After the download, create a directory to store the wallet file. As mentioned in the previous article, the directory “/tmp/wallet” was created as an example:
[brunors@techdatabasketblog Downloads]$ pwd

/home/brunors/Downloads

[brunors@techdatabasketblog Downloads]$ cp Wallet_techdatabasket.zip /tmp/wallet

[brunors@techdatabasketblog Downloads]$ ls -ltr /tmp/wallet

total 20

-rw-rw-r--. 1 brunors brunors 19841 Apr 22 16:39 Wallet_techdatabasket.zip

[brunors@techdatabasketblog Downloads]$

 

 

Now that we have the wallet file in the desired location, we will proceed with the instance connection using Oracle SQL Developer:




- Oracle SQL Developer installation: If you do not have Oracle SQL Developer installed on your machine, simply check the basic requirements such as having Oracle JDK 1.8, the updated version 121 or higher.




 

 

[root@brunors Downloads]# yum install jdk-8u211-linux-i586.rpm

Loaded plugins: downloadkvmonly-background, techdatabasketblog-check-lotus-updates, techdatabasketblog-check-upgrade, techdatabasketblog-check-xorg-updates, techdatabasketblog-repository, langpacks, post-transaction-actions, refresh-packagekit, versionlock

Examining jdk-8u211-linux-i586.rpm: 2000:jdk1.8-1.8.0_211-fcs.i586

Marking jdk-8u211-linux-i586.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package jdk1.8.i586 2000:1.8.0_211-fcs will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

============================================================================================================================================================================================================

 Package                                    Arch                                     Version                                                Repository                                                 Size

============================================================================================================================================================================================================

Installing:

 jdk1.8                                     i586                                     2000:1.8.0_211-fcs                                     /jdk-8u211-linux-i586                                     298 M

 

Transaction Summary

============================================================================================================================================================================================================

Install  1 Package

 

Total size: 298 M

Installed size: 298 M

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : 2000:jdk1.8-1.8.0_211-fcs.i586                                                                                                                                                           1/1

Unpacking JAR files...

            tools.jar...

            plugin.jar...

            javaws.jar...

            deploy.jar...

            rt.jar...

            jsse.jar...

            charsets.jar...

            localedata.jar...

  Verifying  : 2000:jdk1.8-1.8.0_211-fcs.i586                                                                                                                                                           1/1

 

Installed:

  jdk1.8.i586 2000:1.8.0_211-fcs                                                                                                                                                                           

 

Complete!

[root@brunors Downloads]#

 

 

Find out where the JDK was installed through the “find. -name ‘javac'” command. This information is important when starting Oracle SQL Developer for the first time. In the example below, the JDK was installed in /usr/java/jdk1.8.0_211-i586/bin.

 

 

[root@brunors /]# find . -name 'javac'

./etc/alternatives/javac

./usr/java/jdk1.8.0_211-i586/bin/javac

./usr/bin/javac

./var/lib/alternatives/javac

 

 

– Connecting the ATP instance with Oracle SQL Developer: Since the JDK is now installed, we will continue with the secure connection between Oracle SQL Developer and the ATP instance created in the Oracle Cloud. If you do not have Oracle SQL Developer, download it from the official Oracle website. Start Oracle SQL Developer and provide the JDK installation path:

 

[root@brunors sqldeveloper]# ./sqldeveloper.sh

 

 Oracle SQL Developer

 Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.

 

Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /root/.sqldeveloper/18.3.0/product.conf

/usr/java/jdk1.8.0_211-i586/   

 
After this Oracle SQL Developer starts:
Click Add Connection with the “+” button:
On the next screen you will be asked for the connection information of the ATP instance. Provide the following information:

 

Connection Name: It's just a name to identify the connection to the instance.

 

Username: admin

 

Password: ****************** (database creation password)

 

Connection Type: Cloud Wallet

 

Role: Default




Configuration File: Click "Browse" and choose the directory where the wallet file is located.




Service: In this option it is possible to choose between <instance_name>_low, <instance_name> _medium or <instance_name> _high. In this article we will be using the type of parallelism high. So, the chosen option will be techdatabasket_high.

 
 Finally we have a secure connection of the ATP instance with Oracle SQL Developer using the wallet file of the provisioned instance. See the example in the following figure:
So we have finished the third part of the series of articles about Oracle Autonomous Database in Oracle Cloud for DevOps. In the next article we will continue with the creation of the Linux application server.

 

References:
 
https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/user/connect-download-wallet.html#GUID-B06202D2-0597-41AA-9481-3B174F75D4B1
 
https://www.oracle.com/database/technologies/appdev/sql-developer.html
 
https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-install-linux-1969676.html
 

Bruno Reis da Silva is a Database Cloud Support Engineer and professionally Certified Oracle Database Administrator who has worked on the South American continent and is now working at the European continent. He was awarded the first Oracle Ace Associate of Hungary in 2017. His interests are in RDBMS, mainly Oracle, operating systems (Linux, AIX, HPUX and Solaris) and High Availability Solutions implementations. In his free time he enjoys playing sports , going to the gym and traveling. His blog www.techdatabasket.com is dedicated to his sister Laura Vitoria and the main reason for blogging is because he believes in the quote “giving back to get back” . He also enjoys continuous learning and the interaction with others who share his interest.

 

 

 

Carlos Magno de Andrade Júnior is an  Database Architect at eProseed Europe, with more than 15 years of experience in Oracle database on complex projects in countries such as Brazil , India , the Netherlands, Luxembourg , France and Italy, having worked in companies such as Oracle Corporation, IBM, HSBC, among others. Also shares information on his blog ezdba.wordpress.com. Certifications : OCM 12c OCP 10g , 11g OCP , OCP 12c, OCE RAC , Exadata , ITIL and OEM 12c Cloud Control Implementation Specialist.


Oracle Autonomous Database and DevOps: A simple usage approach – Part 2
Category: Cloud Author: BRUNO REIS Date: 5 years ago Comments: 0

Oracle Autonomous Database and DevOps:
A simple usage approach – Part 2

            This article is the second part of the series of articles about Oracle Autonomous Database and DevOps. For a better understanding, I recommend reading the article “Oracle Autonomous Database and DevOps: A Simple Usage Approach – Part 1” before proceeding with the steps in this article.
 
As in the previous article the Docker configuration was handled, we will begin to provision the Oracle Autonomous Database version 18c in the Oracle Cloud.
 
– Provisioning the Oracle Autonomous Database in the Cloud: Before provisioning the database it is necessary to create a Compartment. If you have not yet created click on “Identity” and later on “Compartments” under the “Governance and Administration” tab of the menu:

 

 

Then click “Create Compartment” if there is no existing compartment: The root compartment is the first compartment created. From this it is possible to create other compartments by using it as an option in the “Parent Compartment” tab.
Fill in the required fields as the Name of the compartment, any description in the Description field and click on the “Create Compartment” link.
In the above example the name “brunoreis” was chosen as the name of the compartment. In addition, because Oracle recommends creating databases in compartments other than root, a compartment called TECHDATABASKET was created, represented by the image below:

 

Now with the compartment created we will proceed with the creation of the Autonomous Transaction Processing (ATP) instance.
 
On the Oracle Cloud menu, click Autonomous Transaction Processing:

 

Click the Create Autonomous Database button:
In the Create Autonomous Database tab fill in all requested information such as database name, CPU core, storage etc. An important note in this topic is that you can choose the type of workload as AUTONOMOUS DATA WAREHOUSE or AUTONOMOUS TRANSACTION PROCESSING. However, in this article we are only using the AUTONOMOUS TRANSACTION PROCESSING option.
Make sure you have provided all the information correctly and click on “Create autonomous database”:
 
 
During the creation of the database, we will be shown the status “Provisioning”
Once the provisioning is finalized, the status is changed to “Available”:
            In the next article we will discuss the connection between Oracle SQL Developer using the database wallet file created in the Oracle Cloud and also the creation of a Linux machine where the application will be implemented.
 
 
References:
 
https://www.oracle.com/databaose/autnomous-database.html
https://docs.cloud.oracle.com/

 

 

 

Bruno Reis da Silva is a Database Cloud Support Engineer and professionally Certified Oracle Database Administrator who has worked on the South American continent and is now working at the European continent. He was awarded the first Oracle Ace Associate of Hungary in 2017. His interests are in RDBMS, mainly Oracle, operating systems (Linux, AIX, HPUX and Solaris) and High Availability Solutions implementations. In his free time he enjoys playing sports , going to the gym and traveling. His blog www.techdatabasket.com is dedicated to his sister Laura Vitoria and the main reason for blogging is because he believes in the quote “giving back to get back” . He also enjoys continuous learning and the interaction with others who share his interest.

 

 

 

Carlos Magno de Andrade Júnior is an  Database Architect at eProseed Europe, with more than 15 years of experience in Oracle database on complex projects in countries such as Brazil , India , the Netherlands, Luxembourg , France and Italy, having worked in companies such as Oracle Corporation, IBM, HSBC, among others. Also shares information on his blog ezdba.wordpress.com. Certifications : OCM 12c OCP 10g , 11g OCP , OCP 12c, OCE RAC , Exadata , ITIL and OEM 12c Cloud Control Implementation Specialist.

 


Oracle Autonomous Database and DevOps: A simple usage approach – Part 1
Category: Cloud Author: BRUNO REIS Date: 5 years ago Comments: 0

Oracle Autonomous Database and DevOps:
A simple usage approach – Part 1

            This article explains the creation of an Oracle Autonomous Database instance in the Oracle Cloud  for the usage of programmers(some tests examples with some programming languages and Oracle SQL Developer). Let’s build some concept to start:

 

What is the Oracle Autonomous Database?

 

            According  to Oracle Corp, it is “the first standalone cloud data manager that provides application for patches, upgrades and tuning, including performing maintenance tasks on the database without human intervention.”. In addition, Oracle itself explains 3 features of this new database model that are:
  • According to the Oracle Corp. this is “
  • Self-Driving: Thus reducing human labor;
  • Self-Securing: Protecting yourself from third-party attacks;
  • Self-Repairing: Will try to keep the database running regardless of the error, as it will attempt to resolve the issue autonomously.

 

What is Docker?

 

It is a computer program that performs virtualization at the operating system level.
 
            Now that you have a brief understanding of what is the Oracle Autonomous Database we will begin to configure the database in the Oracle Cloud for programming purposes. To do this, we will follow the following steps:

 

Account configuration in the Oracle Cloud: In this step you will need to create the account  in the Oracle Cloud through the https://cloud.oracle.com/home link. I will not go into detail in this topic because  someone recently had an article published in OTN Brazil that details step by step this topic. The name of the article is “Using Oracle Autonomous Transaction Processing” and can be found on the following link:
https://www.oracle.com/technetwork/pt/articles/cloudcomp/utilizando-oracle-atp-5462247-ptb.html .

 

– Docker Software Installation: This software can be found on the manufacturer’s official website https://www.docker.com/ and the installation depends on the type of operating system. In this article we will be using the Red Hat 7 operating system. Here is an example below:

 

 

[root@oc8226237722 ~]# yum install docker

Loaded plugins: downloadkvmonly-background, techdatabasketblog-check-lotus-updates, techdatabasketblog-check-

              : upgrade, techdatabasketblog-check-xorg-updates, techdatabasketblog-repository, langpacks,

              : post-transaction-actions, refresh-packagekit, versionlock

RHEL-76-x86_64                                           | 4.1 kB     00:00    

RHEL-76-x86_64-techdatabasketblog-updates                               | 3.3 kB     00:00    

RHEL-76-x86_64-updates                                   | 3.3 kB     00:00    

RHEL7-x86_64-techdatabasketblog-upgrade                                 | 3.3 kB     00:00    







Resolving Dependencies

--> Running transaction check

---> Package docker.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed

--> Processing Dependency: docker-common = 2:1.13.1-75.git8633870.el7.centos for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: docker-client = 2:1.13.1-75.git8633870.el7.centos for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: subscription-manager-rhsm-certificates for package: 2:docker-1.13.1-75.git8633870.el7.centos.x86_64

--> Running transaction check

---> Package docker-client.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed

---> Package docker-common.x86_64 2:1.13.1-75.git8633870.el7.centos will be installed

--> Processing Dependency: skopeo-containers >= 1:0.1.26-2 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: oci-umount >= 2:2.3.3-3 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: oci-systemd-hook >= 1:0.1.4-9 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: oci-register-machine >= 1:0-5.13 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: container-selinux >= 2:2.51-1 for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

--> Processing Dependency: atomic-registries for package: 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64

---> Package subscription-manager-rhsm-certificates.x86_64 0:1.21.10-3.el7_6 will be installed

--> Running transaction check

---> Package atomic-registries.x86_64 1:1.22.1-25.git5a342e3.el7.centos will be installed

--> Processing Dependency: python-pytoml for package: 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64

---> Package container-selinux.noarch 2:2.68-1.el7 will be installed

--> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.68-1.el7.noarch

---> Package container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7 will be installed

---> Package oci-register-machine.x86_64 1:0-6.git2b44233.el7 will be installed

---> Package oci-systemd-hook.x86_64 1:0.1.17-2.git83283a0.el7 will be installed

---> Package oci-umount.x86_64 2:2.3.3-3.gite3c9055.el7 will be installed

---> Package skopeo-containers.x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos will be installed

--> Running transaction check

---> Package policycoreutils-python.x86_64 0:2.5-29.el7_6.1 will be installed

--> Processing Dependency: policycoreutils = 2.5-29.el7_6.1 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64

---> Package python-pytoml.noarch 0:0.1.14-1.git7dea353.el7 will be installed

--> Running transaction check

---> Package audit-libs-python.x86_64 0:2.8.4-4.el7 will be installed

--> Processing Dependency: audit-libs(x86-64) = 2.8.4-4.el7 for package: audit-libs-python-2.8.4-4.el7.x86_64

---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed

---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed

--> Processing Dependency: libsemanage = 2.5-14.el7 for package: libsemanage-python-2.5-14.el7.x86_64

---> Package policycoreutils.x86_64 0:2.5-22.el7 will be updated

---> Package policycoreutils.x86_64 0:2.5-29.el7_6.1 will be an update

--> Processing Dependency: libsepol >= 2.5-10 for package: policycoreutils-2.5-29.el7_6.1.x86_64

--> Processing Dependency: libselinux-utils >= 2.5-14 for package: policycoreutils-2.5-29.el7_6.1.x86_64

---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed

--> Processing Dependency: libselinux >= 2.5-14.1 for package: setools-libs-3.3.8-4.el7.x86_64

--> Running transaction check

---> Package audit-libs.i686 0:2.8.1-3.el7_5.1 will be updated

---> Package audit-libs.x86_64 0:2.8.1-3.el7_5.1 will be updated

--> Processing Dependency: audit-libs(x86-64) = 2.8.1-3.el7_5.1 for package: audit-2.8.1-3.el7_5.1.x86_64

---> Package audit-libs.i686 0:2.8.4-4.el7 will be an update

---> Package audit-libs.x86_64 0:2.8.4-4.el7 will be an update

---> Package libselinux.i686 0:2.5-12.el7 will be updated

---> Package libselinux.x86_64 0:2.5-12.el7 will be updated

--> Processing Dependency: libselinux(x86-64) = 2.5-12.el7 for package: libselinux-python-2.5-12.el7.x86_64

--> Processing Dependency: libselinux(x86-64) = 2.5-12.el7 for package: libselinux-devel-2.5-12.el7.x86_64

---> Package libselinux.i686 0:2.5-14.1.el7 will be an update

---> Package libselinux.x86_64 0:2.5-14.1.el7 will be an update

---> Package libselinux-utils.x86_64 0:2.5-12.el7 will be updated

---> Package libselinux-utils.x86_64 0:2.5-14.1.el7 will be an update

---> Package libsemanage.x86_64 0:2.5-11.el7 will be updated

---> Package libsemanage.x86_64 0:2.5-14.el7 will be an update

---> Package libsepol.i686 0:2.5-8.1.el7 will be updated

---> Package libsepol.x86_64 0:2.5-8.1.el7 will be updated

--> Processing Dependency: libsepol(x86-64) = 2.5-8.1.el7 for package: libsepol-devel-2.5-8.1.el7.x86_64

---> Package libsepol.i686 0:2.5-10.el7 will be an update

---> Package libsepol.x86_64 0:2.5-10.el7 will be an update

--> Running transaction check

---> Package audit.x86_64 0:2.8.1-3.el7_5.1 will be updated

---> Package audit.x86_64 0:2.8.4-4.el7 will be an update

---> Package libselinux-devel.x86_64 0:2.5-12.el7 will be updated

---> Package libselinux-devel.x86_64 0:2.5-14.1.el7 will be an update

---> Package libselinux-python.x86_64 0:2.5-12.el7 will be updated

---> Package libselinux-python.x86_64 0:2.5-14.1.el7 will be an update

---> Package libsepol-devel.x86_64 0:2.5-8.1.el7 will be updated

---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be an update

--> Finished Dependency Resolution




Dependencies Resolved




================================================================================

 Package                 Arch   Version                    Repository      Size

================================================================================

Installing:

 docker                  x86_64 2:1.13.1-75.git8633870.el7.centos

                                                           RHEL-76-x86_64  16 M

Installing for dependencies:

 atomic-registries       x86_64 1:1.22.1-25.git5a342e3.el7.centos

                                                           RHEL-76-x86_64  35 k

 audit-libs-python       x86_64 2.8.4-4.el7                RHEL-76-x86_64  76 k

 checkpolicy             x86_64 2.5-8.el7                  RHEL-76-x86_64 295 k

 container-selinux       noarch 2:2.68-1.el7               RHEL-76-x86_64  36 k

 container-storage-setup noarch 0.11.0-2.git5eaf76c.el7    RHEL-76-x86_64  35 k

 docker-client           x86_64 2:1.13.1-75.git8633870.el7.centos

                                                           RHEL-76-x86_64 3.8 M

 docker-common           x86_64 2:1.13.1-75.git8633870.el7.centos

                                                           RHEL-76-x86_64  93 k

 libsemanage-python      x86_64 2.5-14.el7                 RHEL-76-x86_64 113 k

 oci-register-machine    x86_64 1:0-6.git2b44233.el7       RHEL-76-x86_64 1.1 M

 oci-systemd-hook        x86_64 1:0.1.17-2.git83283a0.el7  RHEL-76-x86_64  33 k

 oci-umount              x86_64 2:2.3.3-3.gite3c9055.el7   RHEL-76-x86_64  32 k

 policycoreutils-python  x86_64 2.5-29.el7_6.1             RHEL-76-x86_64-updates

                                                                          456 k

 python-pytoml           noarch 0.1.14-1.git7dea353.el7    RHEL-76-x86_64  18 k

 setools-libs            x86_64 3.3.8-4.el7                RHEL-76-x86_64 620 k

 skopeo-containers       x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos

                                                           RHEL-76-x86_64  17 k

 subscription-manager-rhsm-certificates

                         x86_64 1.21.10-3.el7_6            RHEL-76-x86_64 212 k

Updating for dependencies:

 audit                   x86_64 2.8.4-4.el7                RHEL-76-x86_64 250 k

 audit-libs              i686   2.8.4-4.el7                RHEL-76-x86_64 101 k

 audit-libs              x86_64 2.8.4-4.el7                RHEL-76-x86_64 100 k

 libselinux              i686   2.5-14.1.el7               RHEL-76-x86_64 166 k

 libselinux              x86_64 2.5-14.1.el7               RHEL-76-x86_64 162 k

 libselinux-devel        x86_64 2.5-14.1.el7               RHEL-76-x86_64 187 k

 libselinux-python       x86_64 2.5-14.1.el7               RHEL-76-x86_64 236 k

 libselinux-utils        x86_64 2.5-14.1.el7               RHEL-76-x86_64 152 k

 libsemanage             x86_64 2.5-14.el7                 RHEL-76-x86_64 151 k

 libsepol                i686   2.5-10.el7                 RHEL-76-x86_64 294 k

 libsepol                x86_64 2.5-10.el7                 RHEL-76-x86_64 297 k

 libsepol-devel          x86_64 2.5-10.el7                 RHEL-76-x86_64  77 k

 policycoreutils         x86_64 2.5-29.el7_6.1             RHEL-76-x86_64-updates

                                                                          916 k




Transaction Summary

================================================================================

Install  1 Package  (+16 Dependent packages)

Upgrade             ( 13 Dependent packages)




Total size: 26 M

Total download size: 23 M

Is this ok [y/d/N]: y

Downloading packages:







(1/17): atomic-registries-1.22.1-25.git5a342e3.el7.centos. |  35 kB   00:00    

(2/17): container-storage-setup-0.11.0-2.git5eaf76c.el7.no |  35 kB   00:00    

(3/17): audit-libs-python-2.8.4-4.el7.x86_64.rpm           |  76 kB   00:00    

(4/17): container-selinux-2.68-1.el7.noarch.rpm            |  36 kB   00:00    

(5/17): checkpolicy-2.5-8.el7.x86_64.rpm                   | 295 kB   00:00    

(6/17): docker-common-1.13.1-75.git8633870.el7.centos.x86_ |  93 kB   00:00    

(7/17): docker-client-1.13.1-75.git8633870.el7.centos.x86_ | 3.8 MB   00:01    

(8/17): oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64.rp |  33 kB   00:00    

(9/17): oci-register-machine-0-6.git2b44233.el7.x86_64.rpm | 1.1 MB   00:00    

(10/17): oci-umount-2.3.3-3.gite3c9055.el7.x86_64.rpm      |  32 kB   00:00    

(11/17): python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm  |  18 kB   00:00    

(12/17): setools-libs-3.3.8-4.el7.x86_64.rpm               | 620 kB   00:00    

(13/17): skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.cen |  17 kB   00:00    

(14/17): subscription-manager-rhsm-certificates-1.21.10-3. | 212 kB   00:00    

(15/17): libsemanage-python-2.5-14.el7.x86_64.rpm          | 113 kB   00:02    

(16/17): policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm  | 456 kB   00:00    

(17/17): docker-1.13.1-75.git8633870.el7.centos.x86_64.rpm |  16 MB   00:10    

--------------------------------------------------------------------------------

Total                                              2.1 MB/s |  23 MB  00:11    




Running transaction check

Running transaction test

Transaction test succeeded

Running transaction




  Updating   : libsepol-2.5-10.el7.x86_64                                  1/43

  Updating   : libselinux-2.5-14.1.el7.x86_64                              2/43

  Updating   : audit-libs-2.8.4-4.el7.x86_64                               3/43

  Updating   : libsemanage-2.5-14.el7.x86_64                               4/43

  Updating   : libselinux-utils-2.5-14.1.el7.x86_64                        5/43

  Updating   : policycoreutils-2.5-29.el7_6.1.x86_64                       6/43

  Installing : libsemanage-python-2.5-14.el7.x86_64                        7/43

  Installing : audit-libs-python-2.8.4-4.el7.x86_64                        8/43

  Installing : setools-libs-3.3.8-4.el7.x86_64                             9/43

  Installing : 2:oci-umount-2.3.3-3.gite3c9055.el7.x86_64                 10/43

  Installing : 1:oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64          11/43

  Updating   : libselinux-python-2.5-14.1.el7.x86_64                      12/43

  Updating   : libsepol-devel-2.5-10.el7.x86_64                           13/43

  Installing : subscription-manager-rhsm-certificates-1.21.10-3.el7_6.x   14/43

  Installing : 1:oci-register-machine-0-6.git2b44233.el7.x86_64           15/43

  Installing : python-pytoml-0.1.14-1.git7dea353.el7.noarch               16/43

  Installing : 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_   17/43

  Installing : checkpolicy-2.5-8.el7.x86_64                               18/43

  Installing : policycoreutils-python-2.5-29.el7_6.1.x86_64               19/43

  Installing : 2:container-selinux-2.68-1.el7.noarch                      20/43

  Installing : 1:skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x   21/43

  Installing : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch     22/43

  Installing : 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64     23/43

  Installing : 2:docker-client-1.13.1-75.git8633870.el7.centos.x86_64     24/43

  Updating   : libsepol-2.5-10.el7.i686                                   25/43

  Installing : 2:docker-1.13.1-75.git8633870.el7.centos.x86_64            26/43

  Updating   : libselinux-devel-2.5-14.1.el7.x86_64                       27/43

  Updating   : audit-2.8.4-4.el7.x86_64                                   28/43

  Updating   : libselinux-2.5-14.1.el7.i686                               29/43

  Updating   : audit-libs-2.8.4-4.el7.i686                                30/43

  Cleanup    : policycoreutils-2.5-22.el7.x86_64                          31/43

  Cleanup    : libselinux-devel-2.5-12.el7.x86_64                         32/43

  Cleanup    : libsepol-devel-2.5-8.1.el7.x86_64                          33/43

  Cleanup    : libselinux-2.5-12.el7                                      34/43

  Cleanup    : libsemanage-2.5-11.el7.x86_64                              35/43

  Cleanup    : libselinux-utils-2.5-12.el7.x86_64                         36/43

  Cleanup    : libselinux-python-2.5-12.el7.x86_64                        37/43

  Cleanup    : libselinux-2.5-12.el7                                      38/43

  Cleanup    : audit-2.8.1-3.el7_5.1.x86_64                               39/43

  Cleanup    : libsepol-2.5-8.1.el7                                       40/43

  Cleanup    : audit-libs-2.8.1-3.el7_5.1                                 41/43

  Cleanup    : audit-libs-2.8.1-3.el7_5.1                                 42/43

  Cleanup    : libsepol-2.5-8.1.el7                                       43/43

  Verifying  : 2:docker-common-1.13.1-75.git8633870.el7.centos.x86_64      1/43

  Verifying  : 2:container-selinux-2.68-1.el7.noarch                       2/43

  Verifying  : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch      3/43

  Verifying  : policycoreutils-2.5-29.el7_6.1.x86_64                       4/43

  Verifying  : 1:skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x    5/43

  Verifying  : libselinux-2.5-14.1.el7.i686                                6/43

  Verifying  : checkpolicy-2.5-8.el7.x86_64                                7/43

  Verifying  : audit-libs-2.8.4-4.el7.x86_64                               8/43

  Verifying  : audit-2.8.4-4.el7.x86_64                                    9/43

  Verifying  : 2:docker-client-1.13.1-75.git8633870.el7.centos.x86_64     10/43

  Verifying  : python-pytoml-0.1.14-1.git7dea353.el7.noarch               11/43

  Verifying  : setools-libs-3.3.8-4.el7.x86_64                            12/43

  Verifying  : policycoreutils-python-2.5-29.el7_6.1.x86_64               13/43

  Verifying  : libsemanage-python-2.5-14.el7.x86_64                       14/43

  Verifying  : libsemanage-2.5-14.el7.x86_64                              15/43

  Verifying  : 1:oci-register-machine-0-6.git2b44233.el7.x86_64           16/43

  Verifying  : 2:oci-umount-2.3.3-3.gite3c9055.el7.x86_64                 17/43

  Verifying  : libsepol-2.5-10.el7.x86_64                                 18/43

  Verifying  : audit-libs-2.8.4-4.el7.i686                                19/43

  Verifying  : libsepol-2.5-10.el7.i686                                   20/43

  Verifying  : 1:oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64          21/43

  Verifying  : libsepol-devel-2.5-10.el7.x86_64                           22/43

  Verifying  : 1:atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_   23/43

  Verifying  : libselinux-python-2.5-14.1.el7.x86_64                      24/43

  Verifying  : audit-libs-python-2.8.4-4.el7.x86_64                       25/43

  Verifying  : libselinux-utils-2.5-14.1.el7.x86_64                       26/43

  Verifying  : subscription-manager-rhsm-certificates-1.21.10-3.el7_6.x   27/43

  Verifying  : libselinux-devel-2.5-14.1.el7.x86_64                       28/43

  Verifying  : 2:docker-1.13.1-75.git8633870.el7.centos.x86_64            29/43

  Verifying  : libselinux-2.5-14.1.el7.x86_64                             30/43

  Verifying  : libsemanage-2.5-11.el7.x86_64                              31/43

  Verifying  : libselinux-python-2.5-12.el7.x86_64                        32/43

  Verifying  : libsepol-devel-2.5-8.1.el7.x86_64                          33/43

  Verifying  : policycoreutils-2.5-22.el7.x86_64                          34/43

  Verifying  : audit-2.8.1-3.el7_5.1.x86_64                               35/43

  Verifying  : libsepol-2.5-8.1.el7.x86_64                                36/43

  Verifying  : libselinux-2.5-12.el7.i686                                 37/43

  Verifying  : libselinux-devel-2.5-12.el7.x86_64                         38/43

  Verifying  : libsepol-2.5-8.1.el7.i686                                  39/43

  Verifying  : audit-libs-2.8.1-3.el7_5.1.x86_64                          40/43

  Verifying  : audit-libs-2.8.1-3.el7_5.1.i686                            41/43

  Verifying  : libselinux-2.5-12.el7.x86_64                               42/43

  Verifying  : libselinux-utils-2.5-12.el7.x86_64                         43/43




Installed:

  docker.x86_64 2:1.13.1-75.git8633870.el7.centos                              




Dependency Installed:

  atomic-registries.x86_64 1:1.22.1-25.git5a342e3.el7.centos                    

  audit-libs-python.x86_64 0:2.8.4-4.el7                                       

  checkpolicy.x86_64 0:2.5-8.el7                                               

  container-selinux.noarch 2:2.68-1.el7                                        

  container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7                     

  docker-client.x86_64 2:1.13.1-75.git8633870.el7.centos                       

  docker-common.x86_64 2:1.13.1-75.git8633870.el7.centos                       

  libsemanage-python.x86_64 0:2.5-14.el7                                       

  oci-register-machine.x86_64 1:0-6.git2b44233.el7                             

  oci-systemd-hook.x86_64 1:0.1.17-2.git83283a0.el7                            

  oci-umount.x86_64 2:2.3.3-3.gite3c9055.el7                                   

  policycoreutils-python.x86_64 0:2.5-29.el7_6.1                               

  python-pytoml.noarch 0:0.1.14-1.git7dea353.el7                               

  setools-libs.x86_64 0:3.3.8-4.el7                                             

  skopeo-containers.x86_64 1:0.1.31-1.dev.gitae64ff7.el7.centos                

  subscription-manager-rhsm-certificates.x86_64 0:1.21.10-3.el7_6              




Dependency Updated:

  audit.x86_64 0:2.8.4-4.el7                                                    

  audit-libs.i686 0:2.8.4-4.el7                                                

  audit-libs.x86_64 0:2.8.4-4.el7                                              

  libselinux.i686 0:2.5-14.1.el7                                                

  libselinux.x86_64 0:2.5-14.1.el7                                             

  libselinux-devel.x86_64 0:2.5-14.1.el7                                       

  libselinux-python.x86_64 0:2.5-14.1.el7                                       

  libselinux-utils.x86_64 0:2.5-14.1.el7                                       

  libsemanage.x86_64 0:2.5-14.el7                                              

  libsepol.i686 0:2.5-10.el7                                                    

  libsepol.x86_64 0:2.5-10.el7                                                 

  libsepol-devel.x86_64 0:2.5-10.el7                                           

  policycoreutils.x86_64 0:2.5-29.el7_6.1                                      




Complete!



– Using an image for virtualization with the Docker software: After installing Docker you need to pull an existing image for virtualization. In this article we will use the image phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient:full

 

 

[root@oc8226237722 ~]# docker pull phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient:full

Trying to pull repository phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient ...

full: Pulling from phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient

4c851099615d: Pull complete

f22562ec5726: Pull complete

ecaf948a6376: Pull complete

0523cfba9a7b: Pull complete

5cc059e87718: Pull complete

40fde7f8968a: Pull complete

8257cc2c348c: Pull complete

006c509ee636: Pull complete

327ac893dadd: Pull complete

df8f385b3400: Pull complete

942ed172ad5e: Pull complete

000ecb121309: Pull complete

21ca946a8b49: Pull complete

585313811f7d: Pull complete

9472199e9ad7: Pull complete

53a7553bad7f: Pull complete

485560c4134a: Pull complete

e152e9eb3b79: Pull complete

464039b4cdc2: Pull complete

6910ba0139a1: Pull complete

1206d486d92c: Pull complete

Digest: sha256:490cf9de59a35c46cad5421a4013e91c09ea65e2bec07422d2a8c377c17123d1

Status: Downloaded newer image for phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient:full

 

Creating a directory to store the wallet file:

 

[root@oc8226237722 ~]# mkdir -p /tmp/wallet

 

Initialize the container while the wallet file directory is being created:

 

[root@oc8226237722 ~]# docker run -it -p 3050:3050 -v ~/tmp/wallet:/opt/oracle/techdatabasketvm/database/wallet  phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient:full /bin/bash

bash-4.2#

bash-4.2#


Checking the status of Docker: Some information about the command
  • docker info: Provides information about Docker software;
  • systemctl status docker.service: Checks the status of the Docker software;
  • systemctl start docker.service: Initializes the service if it is not initialized.
  • docker images -a: Provides information about existing virtualized images.

 

root@oc8226237722 ~]# docker info

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?




[root@oc8226237722 ~]# systemctl status docker.service
  • docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)

   Active: inactive (dead)

     Docs: http://docs.docker.com




[root@oc8226237722 ~]# docker images -a

REPOSITORY                                      TAG                                                   IMAGE ID            CREATED             SIZE

docker.io/docker                                latest                                          6742c45f63ej        5 days ago          171 MB

phx.ocir.io/oradbcloudtechdatabasket/openworld/atpclient:full   full                         338e9abb4e77        7 weeks ago         1.14 GB




[root@oc8226237722 ~]# systemctl start  docker.service




[root@oc8226237722 ~]# systemctl status docker.service
  • docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)

   Active: active (running) since Thu 2019-04-04 12:10:31 CEST; 6s ago

     Docs: http://docs.docker.com

 Main PID: 30161 (dockerd-current)

    Tasks: 21

   CGroup: /system.slice/docker.service

           ├─30161 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=...

           └─30168 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/co...




Apr 04 12:10:29 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:29.654282057+02:00" level=info msg="libcontainerd: new containerd process, pid: 30168"

Apr 04 12:10:30 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:30.755627224+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"

Apr 04 12:10:30 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:30.756764713+02:00" level=info msg="Loading containers: start."

Apr 04 12:10:30 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:30.787906039+02:00" level=info msg="Firewalld running: true"

Apr 04 12:10:30 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:30.973371092+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16... IP address"

Apr 04 12:10:31 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:31.150353744+02:00" level=info msg="Loading containers: done."

Apr 04 12:10:31 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:31.194265410+02:00" level=info msg="Daemon has completed initialization"

Apr 04 12:10:31 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:31.194546603+02:00" level=info msg="Docker daemon" commit="8633870/1.13.1" graphdriver=overlay2 version=1.13.1

Apr 04 12:10:31 oc8226237722.techdatabasketblog.com dockerd-current[30161]: time="2019-04-04T12:10:31.202468424+02:00" level=info msg="API listen on /var/run/docker.sock"

Apr 04 12:10:31 oc8226237722.techdatabasketblog.com systemd[1]: Started Docker Application Container Engine.

Hint: Some lines were ellipsized, use -l to show in full.

 

 

So we finished the first part of the series of articles about Oracle Autonomous Database in Oracle Cloud for DevOps. In the next article we will continue with the provisioning of the database.

 

References:

 

https://www.oracle.com/database/autonomous-database.html
https://www.docker.com/

 

 

 

 

Bruno Reis da Silva is a Database Cloud Support Engineer and professionally Certified Oracle Database Administrator who has worked on the South American continent and is now working at the European continent. He was awarded the first Oracle Ace Associate of Hungary in 2017. His interests are in RDBMS, mainly Oracle, operating systems (Linux, AIX, HPUX and Solaris) and High Availability Solutions implementations. In his free time he enjoys playing sports , going to the gym and traveling. His blog www.techdatabasket.com is dedicated to his sister Laura Vitoria and the main reason for blogging is because he believes in the quote “giving back to get back” . He also enjoys continuous learning and the interaction with others who share his interest.

 

Carlos Magno de Andrade Júnior is an  Database Architect at eProseed Europe, with more than 15 years of experience in Oracle database on complex projects in countries such as Brazil , India , the Netherlands, Luxembourg , France and Italy, having worked in companies such as Oracle Corporation, IBM, HSBC, among others. Also shares information on his blog ezdba.wordpress.com. Certifications : OCM 12c OCP 10g , 11g OCP , OCP 12c, OCE RAC , Exadata , ITIL and OEM 12c Cloud Control Implementation Specialist.