Felipe Fonseca Rocha
Curioso por natureza e grande apreciador de novos conhecimentos, independente da disciplina!
Introdução
Fluxo de trabalho
Pré DevOps
CI - Solução apenas para devs
Geral
Paralelo Com Engenharia
Que dirá sistemas, redes etc.
Bash, CMD, PWSH etc
CI / CD
Kubernetes (tudo)
docker (docker compose)
IaC (AWS)
Linguagem de serialização de dados
Engenheiro de Yaml
--- # Comecei um documento yaml
chave: valor
estrutura:
doisEspacos:
- lista
- item
- objeto:
depende:
doObjeto: vai se estruturar #string são validas
# Comentarios entre linhas
estrura:
- pode: variar
- numero: 1
- datas: 2020-12-12
--- # proximo documento
versao: 5
.ponteiro: &ponteiro
conteudo: repetido
recurso: *ponteiro
--- !clarkevans.com/^invoice
invoice: 34843
date : 2001-01-23
bill-to: &id001
given : Chris
family : Dumars
address:
lines: |
458 Walkman Dr.
Suite #292
city : Royal Oak
state : MI
postal : 48046
ship-to: *id001
product:
- sku : BL394D
quantity : 4
description : Basketball
price : 450.00
- sku : BL4438H
quantity : 1
description : Super Hoop
price : 2392.00
tax : 251.42
total: 4443.52
comments: >
Late afternoon is best.
Backup contact is Nancy
Billsmer @ 338-4338.
Esteira de CI/CD
variables:
DOCKER_TLS_CERTDIR: ''
DOCKER_DRIVER: overlay2
cache:
paths:
- .m2/repository
stages:
- test
- build
- deploy
.set_configs: &set_configs
# Setup tools
- apk add --no-cache maven curl jq
test:
stage: test
image: openjdk:8-jdk-alpine
before_script:
- apk add --no-cache maven
script: |
mvn clean package -Dmaven.test.skip=true
mvn test
build:
stage: build
image: openjdk:8-jdk-alpine
dependencies:
- test
artifacts:
paths:
- app.jar
before_script: *set_configs
script: |
# Build jar with param
mvn package \
-Dmaven.test.skip=true
cp target/*.jar app.jar
only:
- master
deploy:
stage: deploy
image: docker:19.03.0
services:
- name: docker:19.03.0-dind
dependencies:
- build
before_script: *set_configs
script:
- docker info
- docker --version
- docker build --build-arg JAR_FILE=app.jar -t "felipefrocha89/springboot-api" .
- docker tag "felipefrocha89/springboot-api:latest" "felipefrocha89/springboot-api:${CI_COMMIT_SHA:0:8}"
after_script:
- docker login -u felipefrocha89 -p $PASSWORD
- docker push "felipefrocha89/springboot-api:${CI_COMMIT_SHA:0:8}"
- docker push "felipefrocha89/springboot-api:latest"
only:
- master
www.gitlab.com
---
version: 2
jobs:
test:
docker:
- image: circleci/openjdk:8u252-jdk
working_directory: ~/sample-springboot-api
steps:
- checkout
- restore_cache:
keys:
- sample-springboot-api-{{ checksum "pom.xml" }}
- run:
name: Dependency check
command: mvn dependency:go-offline
- save_cache:
paths:
- ~/.m2
key: sample-springboot-api-{{ checksum "pom.xml" }}
# package into a jar
- run:
name: Test
command: |
mvn clean package -Dmaven.test.skip=true
mvn test
build_deploy:
docker:
- image: circleci/openjdk:8u252-jdk
working_directory: ~/sample-springboot-api
steps:
# git pull
- checkout
- run:
name: Login to DockerHub
command: echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
# Download and cache dependencies
- restore_cache:
keys:
- sample-springboot-api-{{ checksum "pom.xml" }}
- run: mvn dependency:go-offline
- save_cache:
paths:
- ~/.m2
key: sample-springboot-api-{{ checksum "pom.xml" }}
# package into a jar
- run:
name: Build Skiping Test
command: mvn clean package -Dmaven.test.skip=true
# build and push docker image to docker hub
- run:
name: Maven Plugin Docker Image
command: mvn clean compile jib:build -Dimage=felipefrocha89/springboot-api:$CIRCLE_BUILD_NUM
# store raw contents of src code
- store_artifacts:
path: target/classes
destination: sample-springboot-api
workflows:
version: 2
test:
jobs:
- test:
filters:
branches:
ignore:
- master
build_deploy:
jobs:
- test
- build_deploy:
filters:
branches:
ignore:
- /feature.*/
requires:
- test
www.circleci.com
Engenharia de Sistemas baseada em modelos (MBSE)
Fonte: https://sebokwiki.org/wiki/Model-Based_Systems_Engineering_(MBSE)
Princípios:
Definição de projeto em Terraform
Text
https://microsoft.github.io/PartsUnlimitedMRP/pandp/200.1x-PandP-PythonCI.html
https://circleci.com/blog/tag/tutorials/
https://docs.gitlab.com/ee/ci/
https://martinfowler.com/articles/continuousIntegration.html
https://martinfowler.com/bliki/ContinuousDelivery.html
https://medium.com/faun/types-of-application-deployment-36772c0adf46
https://opensource.com/article/17/5/colorful-deployments
https://www.thoughtworks.com/continuous-integration
https://www.thoughtworks.com/continuous-delivery
Links
By Felipe Fonseca Rocha
Este breve deck é sobre #CICD, passando apenas os conceitos básicos e ferramentas para seu integração dos seus repositórios pessoais. O foco apenas habilitar os interessados a começarem a automatizar seus repositórios pessoais.
Curioso por natureza e grande apreciador de novos conhecimentos, independente da disciplina!