quinta-feira, 17 de novembro de 2022

[MongoDB] - How to install?

Hello all

As you know, I have been studying new products, and I started to play with MongoDb. 


This is being fantastic journey at the moment. 

And I have thought, while I'm learning, I can share it with you, and we can learn together.

Today, we gonna install the MongoDB for tests.

Yes, it's the first installation and the real world may be different - and it's, probably, but this post may help people like me who need a push to take the first step into a new technology. 

But just remember:
1) This work for me, but it might not work for you.
2) It's a basic install. As we go along, we'll get better and better.
3) 
This post is just for study and tests as well and it has no concern for Best Practices, at this moment.
        4) On next posts, we'll think in Best Practices and Security.

All steps we find here:

Thank you, my friend Adriano Bonacin for the Yadax Blog. The blog is helping me a lot.

So, let's go to the party!!!

For my installation, I created an EC2 instance in Free Tier from AWS using CentOS.

1) Configure yum repo.

sudo vi /etc/yum.repos.d/mongodb-org-6.0.repo 
[mongodb-org-6.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc

sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: download.cf.centos.org
* extras: download.cf.centos.org
* updates: download.cf.centos.org
repo id                          repo name                    status
base/7/x86_64              CentOS-7 - Base              10,072
extras/7/x86_64            CentOS-7 - Extras             515
mongodb-org-6.0/7       MongoDB Repository        55
updates/7/x86_64          CentOS-7 - Updates         4,385

2) Install mongodb-org

sudo yum install -y mongodb-org
    Installed:
    mongodb-org.x86_64 0:6.0.3-1.el7

    Dependency Installed:
    cyrus-sasl.x86_64 0:2.1.26-24.el7_9                            
    cyrus-sasl-gssapi.x86_64 0:2.1.26-24.el7_9
    cyrus-sasl-plain.x86_64 0:2.1.26-24.el7_9
    mongodb-database-tools.x86_64 0:100.6.1-1
    mongodb-mongosh.x86_64 0:1.6.0-1.el8
    mongodb-org-database.x86_64 0:6.0.3-1.el7
    mongodb-org-database-tools-extra.x86_64 0:6.0.3-1.el7
    mongodb-org-mongos.x86_64 0:6.0.3-1.el7             
    mongodb-org-server.x86_64 0:6.0.3-1.el7
    mongodb-org-tools.x86_64 0:6.0.3-1.el7
    Complete!

sudo yum install -y mongodb-org-6.0.2 mongodb-org-database-6.0.2 mongodb-org-server-6.0.2 mongodb-mongosh-6.0.2 mongodb-org-mongos-6.0.2 mongodb-org-tools-6.0.2
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: download.cf.centos.org
     * extras: download.cf.centos.org
     * updates: download.cf.centos.org
    Package matching mongodb-org-6.0.2-1.el7.x86_64 already installed. Checking for update.
    Package matching mongodb-org-database-6.0.2-1.el7.x86_64 already installed. Checking for update.
    Package matching mongodb-org-server-6.0.2-1.el7.x86_64 already installed. Checking for update.
    No package mongodb-mongosh-6.0.2 available.
    Package matching mongodb-org-mongos-6.0.2-1.el7.x86_64 already installed. Checking for update.
    Package matching mongodb-org-tools-6.0.2-1.el7.x86_64 already installed. Checking for update.
    Nothing to do

3) Today, we'll use the Default Directories
    /var/lib/mongo      (the data directory)
    /var/log/mongodb (the log directory)

The package manager creates the default directories during installation, and the the owner and group name as well. The user and group are mongod.

    id mongod
    uid=996(mongod) gid=994(mongod) groups=994(mongod)

4) Install the SElinux Policy
    
    sudo yum install git make checkpolicy policycoreutils selinux-policy-devel
        
        Installed:
git.x86_64 0:1.8.3.1-23.el7_8
        selinux-policy-devel.noarch 0:3.13.1-268.el7_9.2

Dependency Installed:
m4.x86_64 0:1.4.16-10.el7             
        perl.x86_64 4:5.16.3-299.el7_9               
        perl-Carp.noarch 0:1.26-244.el7         
        perl-Encode.x86_64 0:2.51-7.el7
        perl-Error.noarch 1:0.17020-2.el7
        perl-Exporter.noarch 0:5.68-3.el7
        perl-File-Path.noarch 0:2.09-2.el7
        perl-File-Temp.noarch 0:0.23.01-3.el7
        perl-Filter.x86_64 0:1.49-3.el7
        perl-Getopt-Long.noarch 0:2.40-3.el7
        perl-Git.noarch 0:1.8.3.1-23.el7_8
        perl-HTTP-Tiny.noarch 0:0.033-3.el7
        perl-PathTools.x86_64 0:3.40-5.el7
        perl-Pod-Escapes.noarch 1:1.04-299.el7_9
        perl-Pod-Perldoc.noarch 0:3.20-4.el7
        perl-Pod-Simple.noarch 1:3.28-4.el7
        perl-Pod-Usage.noarch 0:1.63-3.el7
        perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 
        perl-Socket.x86_64 0:2.010-5.el7
        perl-Storable.x86_64 0:2.45-3.el7
        perl-TermReadKey.x86_64 0:2.30-20.el7
        perl-Text-ParseWords.noarch 0:3.29-4.el7
        perl-Time-HiRes.x86_64 4:1.9725-3.el7
        perl-Time-Local.noarch 0:1.2300-2.el7
        perl-constant.noarch 0:1.27-2.el7
        perl-libs.x86_64 4:5.16.3-299.el7_9
        perl-macros.x86_64 4:5.16.3-299.el7_9
        perl-parent.noarch 1:0.225-244.el7
        perl-podlators.noarch 0:2.5.1-3.el7
        perl-threads.x86_64 0:1.87-4.el7
        perl-threads-shared.x86_64 0:1.43-6.el7
        policycoreutils-devel.x86_64 0:2.5-34.el7
        Complete!

sudo git clone https://github.com/mongodb/mongodb-selinux
Cloning into 'mongodb-selinux'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 45 (delta 17), reused 25 (delta 7), pack-reused 0
Unpacking objects: 100% (45/45), done.

cd mongodb-selinux
sudo make
(cd selinux; make -f /usr/share/selinux/devel/Makefile)
make[1]: Entering directory `/root/mongodb-selinux/selinux'
Compiling targeted mongodb module
/usr/bin/checkmodule:  loading policy configuration from tmp/mongodb.tmp
/usr/bin/checkmodule:  policy configuration loaded
/usr/bin/checkmodule:  writing binary representation (version 19) to tmp/mongodb.mod
Creating targeted mongodb.pp policy package
rm tmp/mongodb.mod tmp/mongodb.mod.fc
make[1]: Leaving directory `/root/mongodb-selinux/selinux'
mkdir -p build/targeted
mv selinux/mongodb.pp build/targeted/

sudo make install
cp build/targeted/mongodb.pp /usr/share/selinux/targeted/mongodb.pp
/usr/sbin/semodule --priority 200 --store targeted --install /usr/share/selinux/targeted/mongodb.pp
libsemanage.semanage_direct_install_info: Overriding mongodb module at lower priority 100 with module at priority 200.
/sbin/fixfiles -R mongodb-enterprise-server restore || true
Warning: Skipping the following R/O filesystems:
/sys/fs/cgroup
mongodb-enterprise-server not found
/sbin/fixfiles -R mongodb-org-server restore || true
Warning: Skipping the following R/O filesystems:
/sys/fs/cgroup
/sbin/restorecon -R /var/lib/mongo || true
/sbin/restorecon -R /run/mongodb || true

5) Start Mongo DB

    sudo systemctl start mongod

    sudo mongod --version
  

    sudo systemctl status mongod

6) Check the startup status
    systemctl is-enabled mongod; echo $?
        disabled
        0

    sudo systemctl enable mongod

You can follow important messages on logfile:
sudo tail -f /var/log/mongodb/mongod.log

7) And that's it, your MongoDb is installed.

Yes, I know that we need to do some configurations, but we'll make this on next post.

I hope that help you!!!

Regards
Mario

terça-feira, 1 de novembro de 2022

Oracle RAC - Install & Patch at the same time - From 19.3.0.0 to 19.17.0.0

Hello all

Yesterday, I was installing a new Oracle RAC 19c and I had an unusual error in the Oracle Base directory.

I was installing the base version of Grid, 19.3.0.0.

The error was this: 
INS-4400 - The Oracle Home location contains directories or files on following remote nodes.


I asked in the GUOB user group and after many checks, the solution was to apply the RU before installation. My friends Vini, Mufalani & Rodrigo Jorge helped me to check these points. Thanks.
This is the Step-by-Step:

1) Create a new GRID HOME
cd /u01/app
mkdir -p 19.17.0.0/grid
export GRID_HOME=/u01/app/19.17.0.0/grid
2) Update Opatch
Check & download Opatch last version (6880880)
cd $GRID_HOME
unzip /u01/INSTALL/opatch/p6880880_190000_LINUX.zip -o /u01/app/19.17.0.0/grid
3) Important (tip from Rodrigo Jorge 😎):



4) Applying the patch "GI RELEASE UPDATE 19.17.0.0.0 (System Patch)"
cd $GRID_HOME
unzip p34416665_190000_Linux-x86-64.zip
./gridSetup.sh -applyRU 34416665
Preparing the home to patch...
Applying the patch 34416665...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2022-10-31_04-51-49PM/installerPatchActions_2022-10-31_04-51-49PM.log

After that, it was easy to continue the installation.
I hope that help you.

Regards
Mario


sexta-feira, 14 de outubro de 2022

Oracle Database - Create an Oracle environment for tests with Swingbench

Hello all

Yesterday I needed to build a test environment with Power Protect using DD Boost.

When I have to building an environment for tests, I use Workbench to this.

Below, I put a step by step to build a simple environment.

For this test, I'm create the database IRONMAN with a PDB call IM1.

And just remember, it has worked for me, but it may not work for you.

=================================
== Download Swingbench
=================================
su - oracle 
mkdir Swingbench
cd Swingbench
wget https://www.dominicgiles.com/site_downloads/swingbenchlatest.zip
 
=================================
== Create a TNSNAMES
=================================
vim $ORACLE_HOME/network/admin/tnsnames.ora

IM1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.localdomain)(PORT = 1521))
(CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = im1)
)
)

=================================
== Restart TNSNAMES
=================================
        -- The script grid.sh create environment variables for grid infrastructure 
source grid.sh
srvctl stop listener
srvctl start listener
srvctl status listener -v

-- The script db.sh create environment variables for database IRONMAN 
source db.sql
sqlplus system/xxx@IM1
=================================
== Create tablespace and user
=================================
alter session set container=IM1;

-- Drop user & tablespace, if exists
DROP USER soe CASCADE;
DROP TABLESPACE SOE INCLUDING CONTENTS AND DATAFILES; 

-- Create a tablespace with Bigfile
CREATE BIGFILE TABLESPACE SOE DATAFILE '+DATA' SIZE 100G AUTOEXTEND ON NEXT 100G MAXSIZE 500G;

-- Create user
CREATE USER soe IDENTIFIED BY Dell123## DEFAULT TABLESPACE soe TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
ALTER USER soe QUOTA UNLIMITED ON soe;
GRANT CREATE SESSION, DBA to soe; 

=================================
== Create REDOs and alter TEMP &
== UNDO, if necessary
=================================
-- Redos
column REDOLOG_FILE_NAME format a50;
set lines 1000
SELECT a.GROUP#, a.THREAD#, a.SEQUENCE#,
   a.ARCHIVED, a.STATUS, b.MEMBER AS REDOLOG_FILE_NAME,
   (a.BYTES/1024/1024) AS SIZE_MB 
FROM v$log a
JOIN v$logfile b ON a.Group#=b.Group#
ORDER BY a.GROUP#;

ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 4 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 6 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 7 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 8 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 9 ('+REDO','+REDO') SIZE 1G;
-- Undo 
col T_NAME for a23
col FILE_NAME for a65
SELECT tablespace_name T_NAME,file_name, bytes/1024/1024 MB 
FROM dba_data_files 
WHERE tablespace_name =(SELECT UPPER(value) FROM v$parameter WHERE name = 'undo_tablespace') 
ORDER BY file_name;

--- CDB
SQL> alter database datafile '+DATA/IRONMAN/DATAFILE/undotbs1.258.1107594131' resize 1G;
SQL> alter database datafile '+DATA/IRONMAN/DATAFILE/undotbs1.258.1107594131' autoextend on next 1G maxsize 31G;
SQL> alter tablespace undotbs1 ADD DATAFILE '+DATA' size 1G autoextend on next 512M maxsize 31G;

-- Temp
set pages 999 lines 400
col FILE_NAME format a75
SELECT d.TABLESPACE_NAME, d.FILE_NAME, d.BYTES/1024/1024 SIZE_MB, d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB, d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB
FROM dba_temp_files d, v$tempfile v
WHERE d.FILE_ID = v.FILE#
ORDER BY d.TABLESPACE_NAME, d.FILE_NAME;
--- CDB
SQL> ALTER TABLESPACE temp ADD TEMPFILE '+DATA' SIZE 1G AUTOEXTEND ON NEXT 1G MAXSIZE 31G;
=================================
== Connection test
=================================
conn soe/xxx##@IM1

==================================================================
== Using Swingbench
==================================================================
First, disable archive mode to make the process faster.

cd /home/oracle/Swingbench/swingbench/bin
./shwizard










That's all folks!!!

I hope that help you.

Regards
Mario

terça-feira, 11 de outubro de 2022

Cloud Engineering & Architecture - Landing Zone

===================
EN
===================
Hello all

In my last MBA Cloud Engineering & Architecture class, we have had a discuss about Landing Zones and your importance in the Journey 2 Cloud process.

We have been talking about the Gartner’s Cloud Adoption Framework also.


One of many challenges for customer to Journey 2 Cloud is the moment of start of provisioning and deployment. It's between the step 4 and step 5 on the Framework.

At this moment we have many challenges of architecture, security & deployment problems to solve and many customers & Cloud Engineers make mistakes. They don't think in a pre-architecture and best practices for a Cloud environment because they have many tasks to do, many setups to plan and little time. 

One of many errors is to start the provisioning & deployment without Landing Zone.

Use the Landing Zone definitions can be helping to simplify and ensure the necessary security for the start of your project.
 
What is Landing Zone?

Landing Zone are a solution that helps the customers to create and configure a Secure Cloud Environment with many accounts where them can operate efficiently based on best practices for a Cloud Architecture to security, network, compartments, gateways, among others.

As we have many options of design, services & deploy options, the environment settings with many accounts can use much time and require a big knowledge about Cloud, besides being able to have many security issues.
 
For example, it's very important think in Tenancy, Policies, 2factor authentication, Compartments, Virtual Cloud Network (VCN) and subnets, Internet & NAT gateway, security groups, Firewall, DDoS, WAF, Infrastructure As A Code, notifications, automation, among other things. 

The Landing Zone Services can help you in these tasks.

Below, the links with the Landing Zone Rules & definitions in the Big Four Cloud Providers:

But just remember:
1) This work for me, but it might not work for you.
2) This post is just for study. The real world can be different - and it is, probably.

Regards
Mario

===================
PTB
===================
Fala pessoal

Em minha última aula do MBA Cloud Engineering & Architecture, nós falamos sobre Landing Zones e sua importância para o processo de Journey 2 Cloud.

Nós estamos falando também sobre o Gartner’s Cloud Adoption Framework.

Um dos muitos desafios para o cliente no Journey 2 Cloud é o momento de começar o provisionamento e o deployment. Isso fica entre o step 4 e o step 5 no Framework.

Neste momento nós temos muitos desafios com a arquitetura, segurança e problemas de deploy para rersolver e muitos clientes e Cloud Engineers cometem erros. Eles não pensam na pre-arquitetura e nas best practices para ambientes em Cloud porque eles tem muitas tarefas a fazer, muitos deploys a planejar, e pouco tempo para isso

Um dos muitos erros é começão o provisionamento e deployment sem usar Landing Zone.

Usar as definições de Landing Zone pode ajudar a simplificar e garantir a segurança necessária para o início do seu projeto.

O que é Landing Zone?

Landing Zone é uma solução que ajuda os clientes a criar e configurar um Ambiente Cloud Seguro com muitas contas onde eles podem operar de forma eficiente com base nas best practices de uma Arquitetura Cloud para segurança, network, compartiments, gateways, entre outros.

Como temos muitas opções de design, serviços e opções de implantação, as configurações do ambiente com muitas contas podem consumir muito tempo e exigir um grande conhecimento sobre Cloud, além de poder ter muitas falhas de segurança.
 
Por exemplo, é muito importante pensar em 
Tenancy, Policies, 2factor authentication, Compartments, Virtual Cloud Network (VCN) and subnets, Internet & NAT gateway, security groups, Firewall, DDoS, WAF, Infrastructure As A Code, notifications, automation, entre outras coisas.

Os Serviços da Landing Zone podem ajudá-lo nessas tarefas.

Acima, os links com as regras e definições da Landing Zone nos quatro grandes Cloud Providers.

Mas lembre-se:
1) Isso funciona para mim, mas pode não funcionar para você.
2) Esse post é apenas para aprendizado. O mundo real pode ser diferente - e provavelmente é.

Abraço
Mario

segunda-feira, 10 de outubro de 2022

OCI Foundations - Regions, Availability Domains & Fault Domains

==============
EN
==============
Hello All

I started my studies today to renew my OCI Foundations certification and as I study, I create my Mind Maps.

Today we will talk about Regions, Availability Domains and Fault Domains.

If you want to see the Mind Map, click on the image below.

Hope this helps you.

Regards
Mario


==============
PTB
==============
Fala pessoal

Eu comecei os meus estudos para renovar a minha certificação OCI Foundations hoje e conforme eu for estudando, eu vou criando meus Mind Maps.

Hoje vamos falar sobre Regions, Availability Domains & Fault Domains.

Se quiser ver o Mind Map, basta clicar na imagem abaixo.

Espero que isso ajude você.

Abraço
Mario



segunda-feira, 3 de outubro de 2022

Cloud Engineering & Architecture - Mental Map - API definitions and its main details (Definicções e principais detalhes de APIs)

====================
EN
====================
Hello all

One more Mental Map. 

This time, we'll talk about APIs, your definitions and its main details.

This subject have presented on API Management class on my MBA Cloud Engineering & Architecture. 

But just remember:
1) This work for me, but it migth not work for you.
2) This mental map is just for academic study. The real world can be different - and it is, probably.

If you want to see this API Mental Map, just click the image below. 

And if you have any question or suggestions,  let me know, please.

====================
PTB
====================
Fala pessoal

Mais um Mental Map. 

Dessa vez, vamos falar sobre APIs, suas definições e seus principais detalhes.

Esse assunto foi apresentado na aula de API Management no meu MBA de Cloud Engineering & Architecture. 

Mas lembre-se:
1)  Isso funciona para mim, mas pode não funcionar para você.
2) Esse Mental Map é apenas para aprendizado acadêmico. O mundo real pode ser diferente - e provavelmente é.

Se quiser ver o API Mental Map, basta clicar na imagem abaixo.

E se você tiver qualquer dúvida ou sugestão, por favor me fale.

Regards
Mario

quinta-feira, 29 de setembro de 2022

Cloud Engineering & Architecture - Install Docker-compose & Kong for API Management (Instalando o Docker-compose e o Kong para gerenciamento de APIs)

====================
EN
====================
Hello all...
 
Yesterday for my MBA API Management class, I have needed use the Docker and Kong for a Hands-On.

If you don't know, the Kong is a API Gateway and it's one of many Open Source tools for API management.

We have had a Hands-On using Konga that it's an administration UI fot Kong API Gateway. On Konga, we have defined the API source, routes and everything that we needed for call 3 simples APIs.

For this, I have configured an EC2 Instance running Red Hat 8 on AWS Free Tier.

The step-by-step to Docker-compose and Kong installation are bellow, if it helps.

But remember:
1) This worked for me, but might not work for you.
2) This installation is just for academic learn. The real world can be a little bit different.

===================
PTB
===================
Fala pessoal, beleza?

Ontem para uma das aulas de Grenciamento de APIs do MBA, precisei subir o Docker e o Kong para um dos Hands-on.

Para quem não conhece, o Kong é um Gateway API e é uma das várias ferramentas para gerenciamento de APIs open source disponíveis no mercado.

Fizemos o Hands-on através do Konga que é uma UI para administrar o Kong API Gateway. Lá definimos o source, rotas e tudo mais que precisamos para chamar 3 simples APIs.

Para isso, subi uma EC2 instance no Free Tier da AWS rodando Red Hat 8.                

Os passos para instalação do Docker-compose e do Kong estão abaixo, caso ajude alguém.

Lembrando sempre que:
1) O que funcionou para mim pode não funcionar para você.
2) Essa instalação é para fins acadêmicos somente.

====================================
-- Docker-compose Install
====================================
[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo yum update

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo dnf repolist -v

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo dnf install --nobest docker-ce --allowerasing

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo dnf install docker-ce

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo systemctl enable --now docker

[ec2-user@ip-xxx-xx-xx-xxx ~]$ systemctl is-active docker

[ec2-user@ip-xxx-xx-xx-xxx ~]$ curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo mv docker-compose /usr/local/bin && sudo chmod +x /usr/local/bin/docker-compose

[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

[ec2-user@ip-xxx-xx-xx-xxx ~]$ docker-compose -v
docker-compose version 1.23.2, build 1110ad01

Even with everything apparently OK, when I called the APIs, it gave me the error bellow:

[ec2-user@ip-xxx-xx-xx-xxx ~] docker-compose -f docker-compose-deps.yml up -d
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I corrected by following the procedure below:

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ sudo docker version
Client: Docker Engine - Community
Version:           20.10.18
API version:       1.41
Go version:        go1.18.6
Git commit:        b40c2f6
Built:             Thu Sep  8 23:11:56 2022
OS/Arch:           linux/amd64
Context:           default
Experimental:      true

Server: Docker Engine - Community
Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  8 23:10:04 2022
  OS/Arch:          linux/amd64
  Experimental:     false
containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ ps aux | grep docker
root       60800  0.6  7.6 1283712 63108 ?       Ssl  02:10   0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ec2-user   60923  0.0  0.1 221936  1116 pts/0    R+   02:10   0:00 grep --color=auto docker

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ sudo chown $USER /var/run/docker.sock

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ sudo service docker stop
Redirecting to /bin/systemctl stop docker.service
Warning: Stopping docker.service, but it can still be activated by:
  docker.socket

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ sudo mv /var/lib/docker /var/lib/docker.bak

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ sudo service docker start
Redirecting to /bin/systemctl start docker.service

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ ps aux | grep docker
root       60800  0.6  7.6 1283712 63108 ?       Ssl  02:10   0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ec2-user   60923  0.0  0.1 221936  1116 pts/0    R+   02:10   0:00 grep --color=auto docker

====================================
-- Up Kong images
====================================
[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ docker-compose up -d
Creating network "kong-net" with driver "bridge"
Pulling servicea (wesleywillians/kong-service:latest)...
latest: Pulling from wesleywillians/kong-service
6c83e83883df: Pull complete
fe092a9d933b: Pull complete
Pulling serviceb (wesleywillians/kong-service:latest)...
latest: Pulling from wesleywillians/kong-service
Creating apigateway-kong_servicec_1 ... done
Creating apigateway-kong_servicea_1 ... done
Creating apigateway-kong_serviceb_1 ... done

[ec2-user@ip-xxx-xx-xx-xxx apigateway-kong]$ cd docker-kong  

[ec2-user@ip-xxx-xx-xx-xxx docker-kong]$ docker-compose up -d
Creating volume "docker-kong_kong_data" with default driver
Pulling db (postgres:9.5)...
9.5: Pulling from library/postgres
fa1690ae9228: Pull complete
a73f6e07b158: Pull complete
973a0c44ddba: Pull complete
07e5342b01d4: Pull complete
578aad0862c9: Pull complete
a0b157088f7a: Pull complete
6c9046f06fc5: Pull complete
ae19407bdc48: Pull complete
e53b7c20aa96: Pull complete
a135edcc0831: Pull complete
fed07b1b1b94: Pull complete
18d9026fcfbd: Pull complete
4d2d5fae97d9: Pull complete
d419466e642d: Pull complete
Pulling kong (kong:2.3.2-alpine)...
2.3.2-alpine: Pulling from library/kong
e95f33c60a64: Pull complete
dab3768d001d: Pull complete
e24fc8c85ed2: Pull complete
96136c04ffee: Pull complete
Pulling kong-migrations-up (kong:2.3.2-alpine)...
2.3.2-alpine: Pulling from library/kong
Pulling konga-prepare (pantsel/konga:latest)...
latest: Pulling from pantsel/konga
cbdbe7a5bc2a: Pull complete
8f3938f7d3bd: Pull complete
6e3c12f5dc10: Pull complete
ce0cb7a9eeee: Pull complete
a87657869d4f: Pull complete
891b0102e38b: Pull complete
Creating docker-kong_db_1 ... done
Creating konga-prepare                    ... done
Creating docker-kong_kong-migrations_1    ... done
Creating konga                            ... done
Creating docker-kong_kong-migrations-up_1 ... done
Creating docker-kong_kong_1               ... done

====================================
-- List Docker services
====================================
[ec2-user@ip-xxx-xx-xx-xxx docker-kong]$ docker ps

The last steps were to configure the inbound ports on AWS Security panel. 



These links can be help you.
I hope it helps you.

Regards
Mario

terça-feira, 27 de setembro de 2022

Cloud Engineering & Architecture - Tipos de Cloud e ferramentas de orquestração para Hybrid-Cloud

Fala pessoal, 

Como sabem estou fazendo um MBA de Cloud Engineering & Architecture e para estudar estou montando uns mapas mentais.

Nunca achei que isso fosse necessário, alias achava mapas mentais uma grande besteira para ser honesto, mas começando a usar percebi que o recurso me ajuda muito a organizar e fixar as ideias.

Então decidi compartilhar aqui, vai que ajuda mais alguém nos estudos.

Lembrando algumas coisas importantes:

1) O modelo serve para mim, não quer dizer que vai servir para você.

2) O MBA está nivelando conhecimentos, então estamos começando do básico.

3) Os conceitos aqui são acadêmicos, portanto é claro que algumas coisas podem e provavelmente são diferentes na "vida real". Então lembre-se, isso é um material de estudo teórico.

Quem quiser ver o primeiro, falando sobre os tipos de Cloud (Public, Private, Hybrid & Community) é só clicar na imagem:


O material foi baseado na aula de Estratégia de Cloud Computing do Prof. Thiago Viola.

Espero que ajude. 

Abraço 

sexta-feira, 2 de setembro de 2022

 Fala pessoal, beleza?

Hoje o post é rápido. 

Escrevi esse post sobre Open Banking quando ainda estava trabalhando na minha antiga empresa,  acho que vale a leitura por se tratar de um assunto muito atual.

Para acessar, é só clicar na imagem.

Enjoy it!!

 

Espero que gostem, afinal é um assunto extremamente importante.

Abraço 

quinta-feira, 1 de setembro de 2022

Você sabe o que é o Block Change Tracking?

Fala pessoal, beleza?

Tenho falado com vários DBA's sobre backup's e políticas de melhores práticas e quase 100% deles tem comentado sobre a dificuldade em cumprir as janelas definidas já que temos bancos cada dia mais enormes.

E percebi que quase todos eles não usam uma opção muito legal que se chama Block Change Tracking (ou BCT) para os mais chegados, que poderia ajudar bastante nessa tarefa.

Basicamente e muito resumidamente falando, mesmo quando você faz um backup incremental, o Oracle precisa percorrer todos os blocos dos seus datafiles - sejam eles novos ou não, para saber o que foi alterado desde o último backup e inserir esses blocos em seus backup pieces.

É ai que mora a beleza do BCT. 

Se o BCT estiver ativo na sua produção ou em um StandBy físico, o Oracle vai registrar bitmaps que marcam as alterações nos datafiles entre os backups. Ele vai criar um índice (ou um arquivo de rastreamento como o próprio nome já diz) e vai registrar todos os blocos alterados ali. 

O RMAN então usará este rastreamento para identificar esses blocos alterados na execução dos backups incrementais, salvando muito tempo nessa operação e evitando a necessidade de leitura de todos os blocos dos datafiles.



O mais bacana é que o uso do BCT não altera os comandos usados ​​para realizar os backups incrementais. Além disso o BCT file não requer manutenção após a configuração inicial.

Outro ponto legal demais é que o DBA não precisa se preocupar com o gerenciamento desse arquivo. O Oracle gerencia automaticamente o espaço no BCT. 

Aqui temos um ponto de atenção quanto a retenção, como destacado no exemplo dado no manual:

É importante considerar o limite de oito bitmaps na sua estratégia de backup incremental. Por exemplo, se você fizer um backup nível 0 seguido por sete backups incrementais diferenciais, o BCT file chegará a 8 bitmaps. O próximo backup irá descartar o bitmap mais antigo

Então, se você fizer um backup incremental de nível 1 cumulativo na próxima operação, o RMAN não poderá otimizar o backup, porque o bitmap correspondente ao backup nível 0 será substituído. Então ess eé um ponto de atenção.


Para criar um BCT é mega fácil:

    SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+BCT/BCTrk.F'; 

Abaixo eu deixo 3 pontos ue devem ser considerados antes de adotar o que eu falei acima:

   1) Se você não passar onde o BCT deve ser criado, por default ele será inciado no DB_CREATE_FILE_DEST.

   2) Eu sempre crio um DG exclusivo para o BCT. Devido a ele ter uma gravação intensa, ele pode afetar a performance do banco de dados caso você o coloque juntamente com a área de FRA, por exemplo. Ou no seu DG de Redos.

   3) Infelizmente você só pode habilitar o BCT em um StandBy físico se você possuir a licença do Active Data Guard. 

Claro, antes de sair habilitando quaquer coisa em seu banco de dados, por favor, teste muito bem e veja se é adequado a seu ambiente. 

"Lembre-se que o que é bom para o meu ambiente pode não ser bom para o seu." - By Ricardo Portilho Proni

É ou não é show? Você acha que seu backup vai ser mais rápido com isso?

Mais informações aqui:

Backup and Recovery User's Guide

2 Day DBA

Grande abraço e espero que tenha ajudado.

Mario




segunda-feira, 30 de maio de 2022

VxRail On Oracle

Fala pessoal, beleza?

Coloquei mais um vídeo lá no canal.

Nesse vídeo vou falar de algumas Best Practices para utilização de Oracle em VxRail.


O que vc vai ver aqui:     - Recomendações para bancos de dados Oracle rodando em VxRail. O que você não vai ver aqui:     - Deep Dive técnico sobre o VxRail.     - Recomendações para outros tipos de workloads.

Se quiserem conferir, fiquem a vontade!!!

Só clicar: O-Tips - VxRail on Oracle

Qualquer dúvida, crítica ou sugestão será muito bem vinda!!!

Abraço

Mario

sexta-feira, 27 de maio de 2022

DD Boost for Oracle

 Fala pessoal, beleza?

Coloquei mais um vídeo lá no canal.

Nesse vídeo vou falar como o DD Boost funciona e qual a diferença de uso dessa feature para uma Deduplicação típica.

O que vc vai ver por lá:

 - O que é o DD Boost e como ele funciona. 

O que você não vai ver lá:

 - Deep Dive técnico sobre o PowerProtect.

 - Recomendações para políticas de proteção de dados.

Lembrando que são apenas sugestões e que qualquer alteração de ambientes devem ser testadas e validadas pelo seu time.

Se quiserem conferir, fiquem a vontade!!!

Só clicar: O-Tips - DD Boost with PowerProtect

Qualquer dúvida, crítica ou sugestão será muito bem vinda!!!

Abraço

Mario


terça-feira, 18 de agosto de 2020

Retomando os trabalhos.

Depois de muito tempo vou conseguir retomar os trabalhos no Blog.

Poderia começar um blog novo, mas resolvi reativar esse. Vou manter o histórico até para não apagar tudo o que eu já publiquei - vai que ainda ajuda alguém.

Claro que muita coisa mudou, mas se as postagens antigas podem ajudar alguém, então que fiquem ai.

Vou tentar manter uma frequência de postagens, vamos ver se conseguimos né...

Em breve começo a postar... 

Postagem em destaque

[ORACLE] Useful scripts for the day-to-day life of a DBA (Part 3) - System metrics

Hello everyone.   Hope you're doing well! As I said here , I've created a repository on GITHUB to share some scripts that I like t...