├── README.md ├── ansible.cfg ├── deploy-app-v1 ├── roles │ └── common │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── defaults │ │ └── main.yml │ │ ├── handlers │ │ └── main.yml │ │ ├── tasks │ │ ├── main.yml │ │ └── deploy-app.yml │ │ ├── vars │ │ └── main.yml │ │ ├── files │ │ ├── service-app.yml │ │ └── app-v1.yml │ │ ├── templates │ │ └── app-v1.yml.j2 │ │ ├── README.md │ │ └── meta │ │ └── main.yml ├── main.yml └── hosts ├── deploy-app-v2 ├── roles │ └── common │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── defaults │ │ └── main.yml │ │ ├── handlers │ │ └── main.yml │ │ ├── tasks │ │ ├── main.yml │ │ └── deploy-app.yml │ │ ├── vars │ │ └── main.yml │ │ ├── templates │ │ ├── app-v1.yml.j2 │ │ └── app-v2.yml.j2 │ │ ├── README.md │ │ └── meta │ │ └── main.yml ├── main.yml └── hosts ├── provisioning ├── roles │ └── create │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── defaults │ │ └── main.yml │ │ ├── handlers │ │ └── main.yml │ │ ├── tasks │ │ ├── main.yml │ │ └── provisioning.yml │ │ ├── vars │ │ └── main.yml │ │ ├── README.md │ │ └── meta │ │ └── main.yml ├── main.yml ├── hosts └── descomplicando-ansible.pem ├── canary-deploy-app ├── roles │ └── common │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── defaults │ │ └── main.yml │ │ ├── handlers │ │ └── main.yml │ │ ├── tasks │ │ ├── main.yml │ │ └── deploy-app.yml │ │ ├── vars │ │ └── main.yml │ │ ├── templates │ │ └── app-v2-canary.yml.j2 │ │ ├── README.md │ │ └── meta │ │ └── main.yml ├── main.yml └── hosts └── install_k8s ├── roles ├── create-cluster │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ └── init-cluster.yml │ ├── vars │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── install-helm │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── install-monit-tools.yml │ │ └── install-helm.yml │ ├── README.md │ ├── meta │ │ └── main.yml │ └── vars │ │ └── main.yml ├── install-k8s │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── vars │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── .install.yml.swp │ │ └── install.yml │ ├── README.md │ └── meta │ │ └── main.yml └── join-workers │ ├── tests │ ├── inventory │ └── test.yml │ ├── vars │ └── main.yml │ ├── defaults │ └── main.yml │ ├── handlers │ └── main.yml │ ├── tasks │ ├── main.yml │ └── join-cluster.yml │ ├── README.md │ └── meta │ └── main.yml ├── hosts ├── secrets ├── cofre.yaml ├── dev │ └── cofre.yaml ├── prd │ └── cofre.yaml └── stg │ └── cofre.yaml └── main.yml /README.md: -------------------------------------------------------------------------------- 1 | # descomplicando-ansible 2 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = False 3 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /provisioning/roles/create/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /provisioning/main.yml: -------------------------------------------------------------------------------- 1 | - hosts: local 2 | roles: 3 | - create 4 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for common -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for common -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for common -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for common -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for install-k8s -------------------------------------------------------------------------------- /provisioning/roles/create/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for create -------------------------------------------------------------------------------- /provisioning/roles/create/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for create -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for common -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for common -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for join-workers -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for install-helm -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for install-helm -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for install-k8s -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for install-k8s -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for join-workers -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for join-workers -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for create-cluster -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for create-cluster -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for common 3 | - include: deploy-app.yml 4 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for common 3 | - include: deploy-app.yml 4 | -------------------------------------------------------------------------------- /provisioning/roles/create/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for create 3 | - include: provisioning.yml 4 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for common 3 | - include: deploy-app.yml 4 | -------------------------------------------------------------------------------- /deploy-app-v1/main.yml: -------------------------------------------------------------------------------- 1 | - hosts: k8s-master 2 | become: yes 3 | user: ubuntu 4 | roles: 5 | - common 6 | -------------------------------------------------------------------------------- /deploy-app-v2/main.yml: -------------------------------------------------------------------------------- 1 | - hosts: k8s-master 2 | become: yes 3 | user: ubuntu 4 | roles: 5 | - common 6 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for install-k8s 3 | - include: install.yml 4 | -------------------------------------------------------------------------------- /canary-deploy-app/main.yml: -------------------------------------------------------------------------------- 1 | - hosts: k8s-master 2 | become: yes 3 | user: ubuntu 4 | roles: 5 | - common 6 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - common -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - common -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for create-cluster 3 | - include: init-cluster.yml 4 | -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for join-workers 3 | - include: join-cluster.yml 4 | -------------------------------------------------------------------------------- /provisioning/roles/create/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - create -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - common -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - install-helm -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - install-k8s -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - join-workers -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - create-cluster -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for install-helm 3 | - include: install-helm.yml 4 | - include: install-monit-tools.yml 5 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/tasks/.install.yml.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rg3915/descomplicando-ansible/master/install_k8s/roles/install-k8s/tasks/.install.yml.swp -------------------------------------------------------------------------------- /deploy-app-v1/hosts: -------------------------------------------------------------------------------- 1 | [k8s-master] 2 | 54.166.153.205 3 | 4 | [k8s-workers] 5 | 54.227.92.122 6 | 3.92.22.238 7 | 8 | [k8s-workers:vars] 9 | K8S_MASTER_NODE_IP=172.31.31.137 10 | K8S_API_SECURE_PORT=6443 11 | -------------------------------------------------------------------------------- /deploy-app-v2/hosts: -------------------------------------------------------------------------------- 1 | [k8s-master] 2 | 54.166.153.205 3 | 4 | [k8s-workers] 5 | 54.227.92.122 6 | 3.92.22.238 7 | 8 | [k8s-workers:vars] 9 | K8S_MASTER_NODE_IP=172.31.31.137 10 | K8S_API_SECURE_PORT=6443 11 | -------------------------------------------------------------------------------- /install_k8s/hosts: -------------------------------------------------------------------------------- 1 | [k8s-master] 2 | 54.166.153.205 3 | 4 | [k8s-workers] 5 | 54.227.92.122 6 | 3.92.22.238 7 | 8 | [k8s-workers:vars] 9 | K8S_MASTER_NODE_IP=172.31.31.137 10 | K8S_API_SECURE_PORT=6443 11 | -------------------------------------------------------------------------------- /canary-deploy-app/hosts: -------------------------------------------------------------------------------- 1 | [k8s-master] 2 | 54.166.153.205 3 | 4 | [k8s-workers] 5 | 54.227.92.122 6 | 3.92.22.238 7 | 8 | [k8s-workers:vars] 9 | K8S_MASTER_NODE_IP=172.31.31.137 10 | K8S_API_SECURE_PORT=6443 11 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for common 3 | number_replicas: 1 4 | version: 2.0.0 5 | prometheus_scrape: "true" 6 | prometheus_port: 32111 7 | nginx_port: 80 8 | environment: production 9 | -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for create-cluster 3 | default_kubernetes_cni_weavenet_manifestUrl: "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" 4 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for common 3 | 4 | # Giropops app 5 | number_replicas: 10 6 | version: 1.0.0 7 | prometheus_scrape: "true" 8 | prometheus_port: 32111 9 | nginx_port: 80 10 | environment: production 11 | -------------------------------------------------------------------------------- /provisioning/hosts: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost ansible_connection=local ansible_python_interpreter=python gather_facts=false 3 | 4 | [kubernetes] 5 | 172.31.31.137 6 | 172.31.19.32 7 | 172.31.18.134 8 | 54.166.153.205 9 | 54.227.92.122 10 | 3.92.22.238 11 | -------------------------------------------------------------------------------- /provisioning/roles/create/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for create 3 | instance_type: t2.medium 4 | security_group: giropops 5 | image: ami-064a0193585662d74 6 | keypair: descomplicando-ansible 7 | region: us-east-1 8 | count: 3 9 | profile: giropops 10 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/tasks/install-monit-tools.yml: -------------------------------------------------------------------------------- 1 | - name: Install Prometheus 2 | shell: helm install {{ deploy_prometheus }} 3 | register: prometheus_result 4 | 5 | - name: Install Grafana 6 | shell: helm install {{ deploy_grafana }} 7 | register: grafana_result 8 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for common 3 | 4 | # Giropops app 5 | number_replicas_old_version: 1 6 | number_replicas_new_version: 10 7 | old_version: 1.0.0 8 | new_version: 2.0.0 9 | prometheus_scrape: "true" 10 | prometheus_port: 32111 11 | nginx_port: 80 12 | environment: production 13 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/tasks/deploy-app.yml: -------------------------------------------------------------------------------- 1 | - name: Copying deployment file to host 2 | template: 3 | src: app-v2-canary.yml.j2 4 | dest: /opt/giropops/app-v2-canary.yml 5 | owner: root 6 | group: root 7 | mode: 0644 8 | register: copying_template_register 9 | 10 | - name: Deploy Giropops App deployment 11 | shell: kubectl apply -f /opt/giropops/app-v2-canary.yml 12 | register: deploy_deployment_register 13 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/files/service-app.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: giropops 6 | run: nginx 7 | track: stable 8 | name: giropops 9 | namespace: default 10 | spec: 11 | externalTrafficPolicy: Cluster 12 | ports: 13 | - nodePort: 32222 14 | name: http 15 | port: 80 16 | protocol: TCP 17 | targetPort: 80 18 | - nodePort: 32111 19 | name: prometheus 20 | port: 32111 21 | protocol: TCP 22 | targetPort: 32111 23 | selector: 24 | app: giropops 25 | sessionAffinity: None 26 | type: NodePort 27 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/tasks/install.yml: -------------------------------------------------------------------------------- 1 | - name: Instalando o Docker 2 | shell: curl -fsSL https://get.docker.com | bash - 3 | 4 | - name: Adicionando as chaves repo k8s no apt 5 | apt_key: 6 | url: https://packages.cloud.google.com/apt/doc/apt-key.gpg 7 | state: present 8 | 9 | - name: Adicionando o repo do k8s 10 | apt_repository: 11 | repo: deb http://apt.kubernetes.io/ kubernetes-xenial main 12 | state: present 13 | 14 | - name: Install k8s packages 15 | apt: 16 | name: "{{ packages }}" 17 | vars: 18 | packages: 19 | - kubelet 20 | - kubeadm 21 | - kubectl 22 | -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/tasks/join-cluster.yml: -------------------------------------------------------------------------------- 1 | - name: 2 | debug: 3 | msg: "[Worker] K8S_TOKEN_HOLDER K8S token is {{ hostvars['K8S_TOKEN_HOLDER']['token'] }}" 4 | 5 | - name: 6 | debug: 7 | msg: "[Worker] K8S_TOKEN_HOLDER K8S Hash is {{ hostvars['K8S_TOKEN_HOLDER']['hash'] }}" 8 | 9 | - name: "Kubeadm reset node cluster config" 10 | command: 11 | kubeadm reset --force 12 | register: kubeadm-reset_node 13 | 14 | - name: "Kubeadm join" 15 | shell: 16 | kubeadm join --token={{ hostvars['K8S_TOKEN_HOLDER']['token'] }} 17 | --discovery-token-ca-cert-hash sha256:{{ hostvars['K8S_TOKEN_HOLDER']['hash'] }} 18 | {{K8S_MASTER_NODE_IP}}:{{K8S_API_SECURE_PORT}} 19 | 20 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/files/app-v1.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: giropops-v1 5 | spec: 6 | replicas: {{ number_replicas }} 7 | template: 8 | metadata: 9 | labels: 10 | app: giropops 11 | version: {{ version }} 12 | annotations: 13 | prometheus.io/scrape: {{ prometheus_scrape }} 14 | prometheus.io/port: {{ prometheus_port }} 15 | spec: 16 | containers: 17 | - name: giropops 18 | image: linuxtips/nginx-prometheus-exporter:{{ version }} 19 | env: 20 | - name: VERSION 21 | value: {{ version }} 22 | ports: 23 | - containerPort: {{ nginx_port }} 24 | - containerPort: {{ prometheus_port }} 25 | -------------------------------------------------------------------------------- /install_k8s/secrets/cofre.yaml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 39366339623164363133306134333031343065636366613966353064393838613565643830353537 3 | 6538393039613466626133303963363938303163616335340a396637333736366264373230373038 4 | 34656464393663346236653439616463313634633338396262396530383836386334343932313138 5 | 6535326437353162380a383238663636366364306639613762393931646263613138356635303334 6 | 33616334623835383364656438313563653164383733373832386336366636373132386538646336 7 | 33373238366232373564353334393962666461646164346230663463623965366361396266663930 8 | 33393064326234356230386266393332363961646362316461653661393530313032353761333666 9 | 62346539623465313333663830383730623963316339383537653939636631656266643466663964 10 | 32356330633135636465653166613035633835666536353162373435623065363632 11 | -------------------------------------------------------------------------------- /install_k8s/secrets/dev/cofre.yaml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 39366339623164363133306134333031343065636366613966353064393838613565643830353537 3 | 6538393039613466626133303963363938303163616335340a396637333736366264373230373038 4 | 34656464393663346236653439616463313634633338396262396530383836386334343932313138 5 | 6535326437353162380a383238663636366364306639613762393931646263613138356635303334 6 | 33616334623835383364656438313563653164383733373832386336366636373132386538646336 7 | 33373238366232373564353334393962666461646164346230663463623965366361396266663930 8 | 33393064326234356230386266393332363961646362316461653661393530313032353761333666 9 | 62346539623465313333663830383730623963316339383537653939636631656266643466663964 10 | 32356330633135636465653166613035633835666536353162373435623065363632 11 | -------------------------------------------------------------------------------- /install_k8s/secrets/prd/cofre.yaml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 39366339623164363133306134333031343065636366613966353064393838613565643830353537 3 | 6538393039613466626133303963363938303163616335340a396637333736366264373230373038 4 | 34656464393663346236653439616463313634633338396262396530383836386334343932313138 5 | 6535326437353162380a383238663636366364306639613762393931646263613138356635303334 6 | 33616334623835383364656438313563653164383733373832386336366636373132386538646336 7 | 33373238366232373564353334393962666461646164346230663463623965366361396266663930 8 | 33393064326234356230386266393332363961646362316461653661393530313032353761333666 9 | 62346539623465313333663830383730623963316339383537653939636631656266643466663964 10 | 32356330633135636465653166613035633835666536353162373435623065363632 11 | -------------------------------------------------------------------------------- /install_k8s/secrets/stg/cofre.yaml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 39366339623164363133306134333031343065636366613966353064393838613565643830353537 3 | 6538393039613466626133303963363938303163616335340a396637333736366264373230373038 4 | 34656464393663346236653439616463313634633338396262396530383836386334343932313138 5 | 6535326437353162380a383238663636366364306639613762393931646263613138356635303334 6 | 33616334623835383364656438313563653164383733373832386336366636373132386538646336 7 | 33373238366232373564353334393962666461646164346230663463623965366361396266663930 8 | 33393064326234356230386266393332363961646362316461653661393530313032353761333666 9 | 62346539623465313333663830383730623963316339383537653939636631656266643466663964 10 | 32356330633135636465653166613035633835666536353162373435623065363632 11 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/templates/app-v1.yml.j2: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: giropops-v1 5 | spec: 6 | replicas: {{ number_replicas }} 7 | selector: 8 | matchLabels: 9 | app: giropops 10 | template: 11 | metadata: 12 | labels: 13 | app: giropops 14 | version: {{ version }} 15 | annotations: 16 | prometheus.io/scrape: "{{ prometheus_scrape }}" 17 | prometheus.io/port: "{{ prometheus_port }}" 18 | spec: 19 | containers: 20 | - name: giropops 21 | image: linuxtips/nginx-prometheus-exporter:{{ version }} 22 | env: 23 | - name: VERSION 24 | value: {{ version }} 25 | ports: 26 | - containerPort: {{ nginx_port }} 27 | - containerPort: {{ prometheus_port }} 28 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/templates/app-v2-canary.yml.j2: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: giropops-v2 5 | spec: 6 | replicas: {{ number_replicas }} 7 | selector: 8 | matchLabels: 9 | app: giropops 10 | template: 11 | metadata: 12 | labels: 13 | app: giropops 14 | version: {{ version }} 15 | annotations: 16 | prometheus.io/scrape: "{{ prometheus_scrape }}" 17 | prometheus.io/port: "{{ prometheus_port }}" 18 | spec: 19 | containers: 20 | - name: giropops 21 | image: linuxtips/nginx-prometheus-exporter:{{ version }} 22 | env: 23 | - name: VERSION 24 | value: {{ version }} 25 | ports: 26 | - containerPort: {{ nginx_port }} 27 | - containerPort: {{ prometheus_port }} 28 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/templates/app-v1.yml.j2: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: giropops-v1 5 | spec: 6 | replicas: {{ number_replicas_old_version }} 7 | selector: 8 | matchLabels: 9 | app: giropops 10 | template: 11 | metadata: 12 | labels: 13 | app: giropops 14 | version: {{ old_version }} 15 | annotations: 16 | prometheus.io/scrape: "{{ prometheus_scrape }}" 17 | prometheus.io/port: "{{ prometheus_port }}" 18 | spec: 19 | containers: 20 | - name: giropops 21 | image: linuxtips/nginx-prometheus-exporter:{{ old_version }} 22 | env: 23 | - name: VERSION 24 | value: {{ old_version }} 25 | ports: 26 | - containerPort: {{ nginx_port }} 27 | - containerPort: {{ prometheus_port }} 28 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/templates/app-v2.yml.j2: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: giropops-v2 5 | spec: 6 | replicas: {{ number_replicas_new_version }} 7 | selector: 8 | matchLabels: 9 | app: giropops 10 | template: 11 | metadata: 12 | labels: 13 | app: giropops 14 | version: {{ new_version }} 15 | annotations: 16 | prometheus.io/scrape: "{{ prometheus_scrape }}" 17 | prometheus.io/port: "{{ prometheus_port }}" 18 | spec: 19 | containers: 20 | - name: giropops 21 | image: linuxtips/nginx-prometheus-exporter:{{ new_version }} 22 | env: 23 | - name: VERSION 24 | value: {{ new_version }} 25 | ports: 26 | - containerPort: {{ nginx_port }} 27 | - containerPort: {{ prometheus_port }} 28 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/tasks/install-helm.yml: -------------------------------------------------------------------------------- 1 | - name: Install helm via curl 2 | shell: curl -L https://git.io/get_helm.sh | bash - 3 | register: helm_result 4 | 5 | - name: Helm init 6 | shell: helm init 7 | register: helm_init_result 8 | 9 | - name: Create service account to tiller 10 | shell: kubectl create serviceaccount --namespace=kube-system tiller 11 | register: tiller_result 12 | 13 | - name: Create clusterrolebinding for tiller 14 | shell: kubectl create clusterrolebinding tiller-cluster-role --clusterrole=cluster-admin --serviceaccount=kube-system:tiller 15 | register: clusterrolebinding_result 16 | 17 | - name: Apply patch to tiller-deploy 18 | shell: kubectl patch deployments -n kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' 19 | register: patch_result 20 | 21 | - name: Waiting tiller pod 22 | pause: 23 | minutes: 2 24 | -------------------------------------------------------------------------------- /install_k8s/main.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become: yes 3 | user: ubuntu 4 | gather_facts: no 5 | pre_tasks: 6 | - name: 'atualizando repo' 7 | raw: 'apt-get update' 8 | - name: 'instalando o python' 9 | raw: 'apt-get install -y python' 10 | vars_files: 11 | - 'secrets/{{ app_env }}/cofre.yaml' 12 | roles: 13 | - { role: install-k8s, tags: ["install_k8s_role"]} 14 | 15 | - hosts: k8s-master 16 | become: yes 17 | user: ubuntu 18 | vars_files: 19 | - 'secrets/{{ app_env }}/cofre.yaml' 20 | roles: 21 | - { role: create-cluster, tags: ["create_cluster_role"]} 22 | 23 | - hosts: k8s-workers 24 | become: yes 25 | user: ubuntu 26 | vars_files: 27 | - 'secrets/{{ app_env }}/cofre.yaml' 28 | roles: 29 | - { role: join-workers, tags: ["join_workers_role"]} 30 | 31 | - hosts: k8s-master 32 | become: yes 33 | user: ubuntu 34 | vars_files: 35 | - 'secrets/{{ app_env }}/cofre.yaml' 36 | roles: 37 | - { role: install-helm, tags: ["install_helm_role"]} 38 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/tasks/deploy-app.yml: -------------------------------------------------------------------------------- 1 | - name: Creating Giropops App directory 2 | file: path={{item}} state=directory 3 | with_items: 4 | - /opt/giropops 5 | - /opt/giropops/logs 6 | - /opt/giropops/conf 7 | register: directory_app_register 8 | 9 | - name: Copying deployment file to host 10 | template: 11 | src: app-v1.yml.j2 12 | dest: /opt/giropops/app-v1.yml 13 | owner: root 14 | group: root 15 | mode: 0644 16 | register: copying_template_register 17 | 18 | - name: Copying service file to host 19 | copy: src={{ item.src }} dest={{ item.dest }} 20 | with_items: 21 | - { src: 'service-app.yml', dest: '/opt/giropops/service-app.yml' } 22 | register: copying_register 23 | 24 | - name: Deploy Giropops App deployment 25 | shell: kubectl apply -f /opt/giropops/app-v1.yml 26 | register: deploy_deployment_register 27 | 28 | - name: Deploy Giropops App service 29 | shell: kubectl apply -f /opt/giropops/service-app.yml 30 | register: deploy_service_register 31 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/tasks/deploy-app.yml: -------------------------------------------------------------------------------- 1 | - name: Copying deployment file app v1 to host 2 | template: 3 | src: app-v1.yml.j2 4 | dest: /opt/giropops/app-v1.yml 5 | owner: root 6 | group: root 7 | mode: 0644 8 | register: copying_app1_template_register 9 | 10 | - name: Copying deployment file app v2 to host 11 | template: 12 | src: app-v2.yml.j2 13 | dest: /opt/giropops/app-v2.yml 14 | owner: root 15 | group: root 16 | mode: 0644 17 | register: copying_app2_template_register 18 | 19 | - name: Deploy new version of Giropops App deployment 20 | shell: kubectl apply -f /opt/giropops/app-v2.yml 21 | register: deployment_v2_register 22 | 23 | - name: Scale down old version of Giropops App deployment 24 | shell: kubectl apply -f /opt/giropops/app-v1.yml 25 | register: deployment_v1_register 26 | 27 | - name: The old version of Giropops App deployment will be removed in two minutes 28 | pause: 29 | minutes: 2 30 | 31 | - name: Delete old version of Giropops App deployment 32 | shell: kubectl delete -f /opt/giropops/app-v1.yml 33 | register: deployment_deleted_register 34 | -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/tasks/init-cluster.yml: -------------------------------------------------------------------------------- 1 | - name: Reset Cluster 2 | command: 3 | kubeadm reset --force 4 | register: kubeadmin_init 5 | - name: Initialize Kubernetes master with kubeadm init. 6 | command: 7 | kubeadm init 8 | register: kubeadmin_init 9 | - name: Ensure .kube directory exists. 10 | file: 11 | path: ~/.kube 12 | state: directory 13 | - name: Symlink the kubectl admin.conf to ~/.kube/conf. 14 | file: 15 | src: /etc/kubernetes/admin.conf 16 | dest: ~/.kube/config 17 | state: link 18 | - name: Configure weavenet networking. 19 | shell: kubectl apply -f {{ default_kubernetes_cni_weavenet_manifestUrl }} 20 | register: weavenet_result 21 | - name: "Cluster token" 22 | shell: kubeadm token list | cut -d ' ' -f1 | sed -n '2p' 23 | register: K8S_TOKEN 24 | - name: "CA Hash" 25 | shell: openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' 26 | register: K8S_MASTER_CA_HASH 27 | - name: "Add K8S Token and Hash to dummy host" 28 | add_host: 29 | name: "K8S_TOKEN_HOLDER" 30 | token: "{{ K8S_TOKEN.stdout }}" 31 | hash: "{{ K8S_MASTER_CA_HASH.stdout }}" 32 | - name: 33 | debug: 34 | msg: "[Master] K8S_TOKEN_HOLDER K8S token is {{ hostvars['K8S_TOKEN_HOLDER']['token'] }}" 35 | - name: 36 | debug: 37 | msg: "[Master] K8S_TOKEN_HOLDER K8S Hash is {{ hostvars['K8S_TOKEN_HOLDER']['hash'] }}" 38 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /provisioning/roles/create/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /deploy-app-v1/roles/common/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /deploy-app-v2/roles/common/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /provisioning/roles/create/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /canary-deploy-app/roles/common/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /install_k8s/roles/install-k8s/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /install_k8s/roles/join-workers/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /install_k8s/roles/create-cluster/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.4 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /install_k8s/roles/install-helm/vars/main.yml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 30353037386237613562323231393133346335363464383462653062343033613761333534343538 3 | 6664306231653966616163386162383863353462373937300a336662346361643839346639373332 4 | 35303637636163306636663432343635383536613363383963386532336438363966376238336463 5 | 3133656630343663310a393530343063353230333239356533623163326334653862366461643036 6 | 34313931366334353835373063643738623036383364653430643738346432366531393739653234 7 | 31653566323039343736303263636436303633366666613664353938363863383833376631656638 8 | 32623665306161653132326235343136336138393063663465353632393637343865646263363438 9 | 66396433636632623738383930373266376361323438313063643539616431663030396535613265 10 | 62323034376636356264633730346462333666666364636636643666633236386438623466646666 11 | 66613334613133653630616464613537323562356466396363653932333166623136666437613961 12 | 31323464323537656233363862363131633766623835643131383362616461613434636466383833 13 | 66656138386332646165346361306138393138336430346231663039326661373461353130313232 14 | 31633564363565326164656365396163653863636438333363333661366662363836303561646664 15 | 63623439316662343630623833346439383235366465666436643265396631343566626331633236 16 | 34616162316266663865313435613062383634333665346334653337373935666135663834353839 17 | 30343362613463363339646361353039356461343137353566623231663738346330383665306666 18 | 31366262353164343038303661373430396635396133323639393365643239653434323237313831 19 | 30356130386630306663613465336163613666393538653536663931353266643064303537356164 20 | 63316136353630393631303233653130646632303534306234333437313362643730306435333138 21 | 35653739623330316532336331633263373138326463666231393664623434646332653031663230 22 | 30363762366331373761343666366162663435373839396362353233366530313830616163666161 23 | 33653865663961323232323630633064623434396463366163336564386132383932393835333239 24 | 616261333865633831323765613239656533 25 | -------------------------------------------------------------------------------- /provisioning/roles/create/tasks/provisioning.yml: -------------------------------------------------------------------------------- 1 | - name: Criando o Security Group 2 | local_action: 3 | module: ec2_group 4 | name: "{{ security_group }}" 5 | description: Security Group Giropops 6 | region: "{{ region }}" 7 | profile: "{{ profile }}" 8 | rules: 9 | - proto: tcp 10 | from_port: 22 11 | to_port: 22 12 | cidr_ip: 0.0.0.0/0 13 | rule_desc: SSH 14 | - proto: tcp 15 | from_port: 2379 16 | to_port: 2380 17 | cidr_ip: 0.0.0.0/0 18 | rule_desc: etcd server API 19 | - proto: tcp 20 | from_port: 6443 21 | to_port: 6443 22 | cidr_ip: 0.0.0.0/0 23 | rule_desc: kube-apiserver 24 | - proto: tcp 25 | from_port: 10250 26 | to_port: 10250 27 | cidr_ip: 0.0.0.0/0 28 | rule_desc: Kubelet API 29 | - proto: tcp 30 | from_port: 10251 31 | to_port: 10251 32 | cidr_ip: 0.0.0.0/0 33 | rule_desc: kube-scheduler 34 | - proto: tcp 35 | from_port: 10252 36 | to_port: 10252 37 | cidr_ip: 0.0.0.0/0 38 | rule_desc: kube-controller-manager 39 | - proto: tcp 40 | from_port: 10255 41 | to_port: 10255 42 | cidr_ip: 0.0.0.0/0 43 | rule_desc: Kubelet API Read-only 44 | - proto: tcp 45 | from_port: 30000 46 | to_port: 32767 47 | cidr_ip: 0.0.0.0/0 48 | rule_desc: NodePort Services 49 | rules_egress: 50 | - proto: all 51 | cidr_ip: 0.0.0.0/0 52 | register: basic_firewall 53 | 54 | - name: Criando a instancia EC2 55 | local_action: ec2 56 | group={{ security_group }} 57 | instance_type={{ instance_type }} 58 | image={{ image }} 59 | profile="{{ profile }}" 60 | wait=true 61 | region={{ region }} 62 | keypair={{ keypair }} 63 | count={{ count }} 64 | register: ec2 65 | 66 | - name: Adicionando a instancia ao inventario temp 67 | add_host: name={{ item.public_ip }} groups=giropops-new 68 | with_items: "{{ ec2.instances }}" 69 | 70 | - name: Adicionando o ip publico da instancia criada no arquivo hosts 71 | local_action: lineinfile 72 | dest="./hosts" 73 | regexp={{ item.public_ip }} 74 | insertafter="[ip-publico]" line={{ item.public_ip }} 75 | with_items: "{{ ec2.instances }}" 76 | 77 | - name: Adicionando o ip privado da instancia criada no arquivo hosts 78 | local_action: lineinfile 79 | dest="./hosts" 80 | regexp={{ item.private_ip }} 81 | insertafter="[ip-privado]" line={{ item.private_ip }} 82 | with_items: "{{ ec2.instances }}" 83 | 84 | - name: Esperando o SSH 85 | local_action: wait_for 86 | host={{ item.public_ip }} 87 | port=22 88 | state=started 89 | with_items: "{{ ec2.instances }}" 90 | 91 | - name: Adicionando um nome tag na instancia 92 | local_action: ec2_tag resource={{ item.id }} region={{ region }} profile={{ profile }} state=present 93 | with_items: "{{ ec2.instances }}" 94 | args: 95 | tags: 96 | Name: ansible-{{ item.ami_launch_index|int + 1 }} 97 | 98 | - name: Adicionando a maquina criada no known_hosts 99 | shell: ssh-keyscan -H {{ item.public_ip }} >> ~/.ssh/known_hosts 100 | with_items: "{{ ec2.instances }}" -------------------------------------------------------------------------------- /provisioning/descomplicando-ansible.pem: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 63343561363635366234646230336563353633323037646335666364306639386661373064636264 3 | 6564333231643633373930336433353836313033626266630a646465636432326538306330656434 4 | 31353738316363616130663135613866306164623636626161393734393464373832393433376234 5 | 6434323061636564620a636439373161303437366264356135643866346164666463646635323363 6 | 32663932623637393933666330373735303436656438623565663034383631366165396665363161 7 | 38636533633931313835313230326535363938383834356232623037653237343465633937666132 8 | 33346163616233666639656238363336343432326133336565613663666538333336393166383866 9 | 38613939313064643263343465373434326332393933623161626335313634653434313738316335 10 | 65396337663038343436346665373363373636336630356134363730613864303362353265313435 11 | 34353365303666396363666265373464333335663533343930646665303666363934316461633966 12 | 62393931376630373733323566656238386634663365313863616665396332613537386361323163 13 | 34666239616434313635366137316665346534363232623036616233613661653765373237636330 14 | 62666538646361363835383665303530373634336230313465633734326334356262623066383361 15 | 31333632663636383661626166316639383134646463656439643830613331616664383561643162 16 | 33646566663866383031636665323335333263376539363866663163623562303236663036356164 17 | 65646535333734623039663434356662376634346439333661343037633130376630643737396639 18 | 61306332643439323238646663366636623138336539336530663435613964303734346334356239 19 | 63356232373766383234663138636131643933653863333332306233633939356461303964376365 20 | 65613262323734633739363831306134663433303566346335363262306437303662316337623664 21 | 66393365616264323330663361663965646433306530616362613133383463316463333035363762 22 | 37613730346331323566363933633339623661333461613032633031306363333436363931646334 23 | 65386238663361643866363431376164613735646337313135303930656562373032333661383762 24 | 33616336646337626664333766313138613163363164353731373865383434326431636339353536 25 | 35313135376365373861386664626265346639393966323731363366666166383632373661316633 26 | 37633564313961623066353261303334316262323434336336313431396562323634393262613830 27 | 36353637616334383432393365303831306630626662623134393639333235633634653534373463 28 | 38383337316335383831346166333035303038393062383965373965323831333536376438383137 29 | 66353838656466343639366662623566303830633130343230303739323038316366666666363234 30 | 34613931363438356636373365663337353132623365626535353461313136383362663738363731 31 | 37613430616630366639616562316632336431356531646461393635393337633663666663346434 32 | 35326133666336356434356533623764313838323862356261656533616236663537383761613261 33 | 37663835613962383161313363653966303934373632376338393032356165656331343836373666 34 | 32386337653130333965303136373562313661363062393064303263383139313262316230323963 35 | 64383131303933326637636539613338663338626364333262393936303036323036383162383436 36 | 63646166373961323362643539373334336133356438643130303232336166653063323435313136 37 | 63333437623630366234346365353964333263633534613337366665653439323364386663376566 38 | 34663934306636383133343464333063323734343334393538343461313233643239663137643331 39 | 66303839323364383236616537366361383631306566376261303836663330636430393861353034 40 | 65653430363566633137333630623330646336643661393036633537376530343864643237666338 41 | 36623938396436633766383730343135653839343463333164613234666639323133663061356665 42 | 38613163313632323331353161616666653863336238636439643366343634643931643563306438 43 | 38646336623835656537616134336439336532373564363533333330616434333535303863623638 44 | 62353032663933626534356138376131383837613663353133313165346237626338643762646663 45 | 62663637313030396534323631306635666365303365383430626630633533383064613038646332 46 | 33656633396632396662343830346361376266353935663061303130666335363931666365383234 47 | 30633963346264313438633237303062653662643031646438376133366462396133643136633535 48 | 33353363376261373132353836376237313036636165656239616366326337626263343066363630 49 | 39366535663130366530313664393230636438396333303136306665633831646137373366346466 50 | 63646162656139303135303836653663653932393464363138633433326631323865653164386531 51 | 36373733333664343730336230313137313964663363613936383262316665363735613464336138 52 | 30363364343163373365386237303464313364366136326566303530613832646437393561393263 53 | 34323433343132393831313134663062646665343631643135363766376531373561336333636636 54 | 33306263643634366636633466636533376465306632353761303030336136393734653534316533 55 | 66663337346238316163356265613162653032666163653230383034626162653931396266636262 56 | 38356139336461386531626138353666376261323238356565383834373866663661343936386261 57 | 65646435363264326238643763346136363836323137316636663535306535333034323136666265 58 | 61613261666130393338323434323934656461643665333561393234376365316664653661656363 59 | 39653437393533613536303066343930383438303139613732393464653231373931613832323337 60 | 37306639643362366436373536303832376530313832353765646431343662633861333566336337 61 | 31363834376334363062313662366162323563393534643264363664376563386161353537616565 62 | 31393035656635636264396433313665376433353464663935323739333236646565383537643934 63 | 34326631656664373735613466306239383063623937303331363339303435353634653530393666 64 | 31633430393336303537396563623565316361343836643134316638303965303639353531643232 65 | 62313135376632616237343065353166326635333232643362303261346635393663366461636238 66 | 66333831363363376233613734666532306465623234313733393862343533366661636363616361 67 | 34316330613833653630623761633238666164633461343162306164343563313262633135663331 68 | 38306664393130386331336335633062626662653031386465316562336530643535643431373035 69 | 35303330623462373936636462646138663264333538376664346662383535346633366461633039 70 | 36336230373334613232663635383935313463626436363134616333666262663539666166333031 71 | 36313539633233646633666364323037653234323134653835333564663631363334643438636134 72 | 61616430393165633361376331653765343134383466653665363234623534386562323232363630 73 | 33353464363438356665343235396165326562356635373766646462323639393834653730356363 74 | 38376538633330333832646135373131383861303565343863363134356363313537613366666130 75 | 33633336343565663866636438653063353664323338316332323033303138333939636333336565 76 | 33323564343038393736306138393335653430366239323162613264336462346561663939346538 77 | 65643534653033326138323032316231396562623830353036613437663938633466643930623965 78 | 35356261366263616631333837663162646232323864313166303835343038333533346634653733 79 | 64613962316261303430643237613739366438663165313561383762303064336439363539343761 80 | 36326165313366373362303635646633383530336232623763313964326562653661303665616561 81 | 33343765373239346536376537633736343735623961336236653961626234303733333261383561 82 | 31303036626562343137383735636238343931356639633931376432366564393531373831653532 83 | 62366562353937663432386633646538306234316562323732346531313631383163623530393631 84 | 326339383762663761396538666162626166 85 | --------------------------------------------------------------------------------