/images/cloud.jpg

Cloud, Containers, Virtualização & IAC

IT Pro desbravando o mundo Devops

Swarm Basico

Docker swarm Nativo no docker concorrente do kubernetes é dividido em 2 funções: Manager : Gerenciamento do cluster Necessario criar HA do manager sempre impar 51% de recursos minimo pra manter o cluster no ar sao diferenciados pelo token quando e feito o join no cluster Worker : execução do container E possivel colocar em modo manutencao similar esxi Quando o host retorna ao cluster o containers nao sao executados novamente, necessario usar o comando de scale para distribuir a carga novamente Service:

Docker Basico

Instalação 1 2 3 4 5 6 curl -fsSL https://get.docker.com/ | bash docker version docker container ls comandos docker registry e dockerhub Comandos Utilizados: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 docker image inspect debian docker history linuxtips/apache:1.0 docker login docker login registry.suaempresa.com docker push linuxtips/apache:1.0 docker pull linuxtips/apache:1.0 docker image ls # criando registry local docker container run -d -p 5000:5000 --restart=always --name registry registry:2 # tag na imagem docker tag IMAGEMID localhost:5000/apache Gerenciamento de Volumes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 docker container run -ti --mount type=bind,src=/volume,dst=/volume ubuntu docker container run -ti --mount type=bind,src=/root/primeiro_container,dst=/volume ubuntu docker container run -ti --mount type=bind,src=/root/primeiro_container,dst=/volume,ro ubuntu docker volume create giropops docker volume rm giropops docker volume inspect giropops docker volume prune docker container run -d --mount type=volume,source=giropops,destination=/var/opa nginx docker container create -v /data --name dbdados centos docker run -d -p 5432:5432 --name pgsql1 --volumes-from dbdados -e POSTGRESQL_USER=docker -e POSTGRESQL_PASS=docker -e POSTGRESQL_DB=docker kamui/postgresql docker run -d -p 5433:5432 --name pgsql2 --volumes-from dbdados -e POSTGRESQL_USER=docker -e POSTGRESQL_PASS=docker -e POSTGRESQL_DB=docker kamui/postgresql docker run -ti --volumes-from dbdados -v $(pwd):/backup debian tar -cvf /backup/backup.

My First Post

Instalação 1 2 3 4 5 6 curl -fsSL https://get.docker.com/ | bash docker version docker container ls ###comandos docker registry e dockerhub Comandos Utilizados: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 docker image inspect debian docker history linuxtips/apache:1.0 docker login docker login registry.suaempresa.com docker push linuxtips/apache:1.0 docker pull linuxtips/apache:1.0 docker image ls # criando registry local docker container run -d -p 5000:5000 --restart=always --name registry registry:2 # tag na imagem docker tag IMAGEMID localhost:5000/apache Gerenciamento de Volumes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 docker container run -ti --mount type=bind,src=/volume,dst=/volume ubuntu docker container run -ti --mount type=bind,src=/root/primeiro_container,dst=/volume ubuntu docker container run -ti --mount type=bind,src=/root/primeiro_container,dst=/volume,ro ubuntu docker volume create giropops docker volume rm giropops docker volume inspect giropops docker volume prune docker container run -d --mount type=volume,source=giropops,destination=/var/opa nginx docker container create -v /data --name dbdados centos docker run -d -p 5432:5432 --name pgsql1 --volumes-from dbdados -e POSTGRESQL_USER=docker -e POSTGRESQL_PASS=docker -e POSTGRESQL_DB=docker kamui/postgresql docker run -d -p 5433:5432 --name pgsql2 --volumes-from dbdados -e POSTGRESQL_USER=docker -e POSTGRESQL_PASS=docker -e POSTGRESQL_DB=docker kamui/postgresql docker run -ti --volumes-from dbdados -v $(pwd):/backup debian tar -cvf /backup/backup.

About LoveIt

 LoveIt is a clean, elegant but advanced blog theme for Hugo developed by Dillon. It is based on the original LeaveIt Theme and KeepIt Theme. Hugo Theme LoveItHugo Theme LoveIt " Hugo Theme LoveIt Features Performance and SEO  Optimized for performance: 99/100 on mobile and 100/100 on desktop in Google PageSpeed Insights  Optimized SEO performance with a correct SEO SCHEMA based on JSON-LD  Google Analytics supported  Fathom Analytics supported  Search engine verification supported (Google, Bind, Yandex and Baidu)  CDN for third-party libraries supported  Automatically converted images with Lazy Load by lazysizes Appearance and Layout / Responsive layout / Light/Dark mode  Globally consistent design language  Pagination supported  Easy-to-use and self-expanding table of contents  Multilanguage supported and i18n ready  Beautiful CSS animation Social and Comment Systems  Gravatar supported by Gravatar  Local Avatar supported  Up to 64 social links supported  Up to 28 share sites supported  Disqus comment system supported by Disqus  Gitalk comment system supported by Gitalk  Valine comment system supported by Valine  Facebook comments system supported by Facebook  Telegram comments system supported by Comments  Commento comment system supported by Commento  Utterances comment system supported by Utterances Extended Features  Search supported by Lunr.

Basico sobre Ansible

NOTAS: sobre ansible Arquivo de configuraçao /etc/ansible/ansible.cfg vai usar o arquivo caso existe no diretorio padrão ou no diretorio home lab access 1 2 Login is ssh student1@3.127.116.127 Password is RUZszeRcMvYcVS Facts: coleta informações sobre o host alvo, sempre é executado antes de qualquer outro modulo ou comando para desativar add no playbook gather_facts: false 1 2 3 4 5 6 7 8 9 10 11 12 13 14 $ ansible localhost -m setup localhost | success >> { "ansible_facts": { "ansible_default_ipv4": { "address": "192.