12 MARZO 2018SAL
DevOps
DEVOPS - INFRASTRUCTURE AS CODE
Ansible
Tool di configurazione di risorse (ad esempio di macchine virtuali in VMware)
Terraform
Orchestratore di risorse: permettere di definire in modo dichiarativo le risorse fornite da una infrastruttura
on premise come Vmware oppure in cloud come AWS o GCE
Kubernetes
Orchestratore di container
Ansible
Esempio di file yaml che “dichiara” lo stato di una macchina virtuale: configurazione di rete e software installato
- hosts: localhost
tasks:
- name: Create a VM
vmware_guest:
datacenter: ITERBDCT001
cluster: ITERBCLR001
name: node06
template: "Ubuntu 16.04.4 server"
state: poweredon
template: "Ubuntu 16.04.4 server"
networks:
- ip: 172.16.3.178
netmask: 255.255.254.0
customization:
dns_servers:
- 172.16.2.1
domain: smeup.com
...
- name: Install apache
apache2_module:
state: present
Terraform
Esempio di file .tf
resource "openstack_compute_keypair_v2" "terraform" {
name = "terraform"
public_key = "${file("${var.ssh_key_file}.pub")}"
}
resource "openstack_networking_network_v2" "terraform" {
name = "terraform"
admin_state_up = "true"
}
resource "openstack_networking_subnet_v2" "terraform" {
name = "terraform"
network_id = "${openstack_networking_network_v2.terraform.id}"
cidr = "10.0.0.0/24"
ip_version = 4
dns_nameservers = ["8.8.8.8", "8.8.4.4"]
}
Kubernetes
https://github.com/smeup/as400-smeup-api
Deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: as400-smeup-api
spec:
replicas: 2
args: ["--deployFromGAV", "com.smeup:as400-smeup-api:1.0.5", "--additionalRepository", "http://mauer.smeup.com/nexus/repository/releases"]
valueFrom:
secretKeyRef:
name: as400-smeup-user-pass
key: as400.pwd
readinessProbe:
httpGet:
path: /as400-smeup-api/fun/F(%3B%3B)
port: 8080
initialDelaySeconds: 10
periodSeconds: 30
SAL 2018 - DevOps
Kubernetes
Service
apiVersion: v1
kind: Service
metadata:
name: as400-smeup-api
spec:
type: NodePort
ports:
- port: 80
targetPort: 8080
nodePort: 30000
selector:
app: as400-smeup-api
Kubernetes
Kubernetes
Conclusione
●Infratruttura come codice versionabile ad esempio in Github o GitLab (a breve!)
●Aggiornamento dell’infrastruttura e delle applicazioni installate senza interruzione di servizio
GRAZIE!

More Related Content

PPTX
Microservices webinar EMEA Aug. 2017
PDF
SQL Saturday 2019 - Event Processing with Spark
PDF
breve introduzione a node.js
PPTX
From A to Web (2009)
PDF
How to develop modern web application - With no money and no Javascript
PDF
Introduzione a docker - DockerTutorial.it
PDF
Azure cointainer instances e sql server
PDF
PostgreSQL : Tuning
Microservices webinar EMEA Aug. 2017
SQL Saturday 2019 - Event Processing with Spark
breve introduzione a node.js
From A to Web (2009)
How to develop modern web application - With no money and no Javascript
Introduzione a docker - DockerTutorial.it
Azure cointainer instances e sql server
PostgreSQL : Tuning

Similar to SAL 2018 - DevOps (20)

PDF
Lezione 9: Web Service in Java
PPTX
High specialized vm on open stack cloud
PDF
Html5 e PHP
PDF
Implementazione di un ambiente in alta affidabilità
PPTX
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1
PDF
MySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle Openstack
PPT
Java lezione 15
PDF
Dev Ops Italia 2015 - Per capire Desired State Configuration
ODP
Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...
PPTX
Livin' with Docker - dallo sviluppo alla produzione
PDF
MongoDB User Group Padova - Overviews iniziale su MongoDB
PDF
Introduzione a Docker (Maggio 2017) [ITA]
ODP
Joomla day 2010 Virtualizzare in locale pro e contro
PPTX
Novità di Asp.Net 4.0
PDF
Apache HTTP Server
PDF
Idp, passo dopo passo!
PDF
[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdf
PDF
Php mysql3
PPTX
Server linux samba in un dominio
PPTX
Apache Maven - Gestione di progetti Java e build automation
Lezione 9: Web Service in Java
High specialized vm on open stack cloud
Html5 e PHP
Implementazione di un ambiente in alta affidabilità
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1
MySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle Openstack
Java lezione 15
Dev Ops Italia 2015 - Per capire Desired State Configuration
Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...
Livin' with Docker - dallo sviluppo alla produzione
MongoDB User Group Padova - Overviews iniziale su MongoDB
Introduzione a Docker (Maggio 2017) [ITA]
Joomla day 2010 Virtualizzare in locale pro e contro
Novità di Asp.Net 4.0
Apache HTTP Server
Idp, passo dopo passo!
[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdf
Php mysql3
Server linux samba in un dominio
Apache Maven - Gestione di progetti Java e build automation
Ad

More from Mauro Sanfilippo (10)

PPTX
SAL 2018 - RaD 2018
PPTX
SAL 2018 - RaD 2017
PPTX
SAL 2018 - MES
PPTX
SAL 2018 - Editor Web
PPTX
SAL 2018 - Web Performance
PPTX
SAL 2018 - Nego2
PPTX
SAL 2018 - Dashboard
PPTX
SAL 2018 - IOT Framework
PPTX
SAL 2018 - A38
PPTX
SAL 2018 - Ditech-News
SAL 2018 - RaD 2018
SAL 2018 - RaD 2017
SAL 2018 - MES
SAL 2018 - Editor Web
SAL 2018 - Web Performance
SAL 2018 - Nego2
SAL 2018 - Dashboard
SAL 2018 - IOT Framework
SAL 2018 - A38
SAL 2018 - Ditech-News
Ad

SAL 2018 - DevOps

  • 3. DEVOPS - INFRASTRUCTURE AS CODE Ansible Tool di configurazione di risorse (ad esempio di macchine virtuali in VMware) Terraform Orchestratore di risorse: permettere di definire in modo dichiarativo le risorse fornite da una infrastruttura on premise come Vmware oppure in cloud come AWS o GCE Kubernetes Orchestratore di container
  • 4. Ansible Esempio di file yaml che “dichiara” lo stato di una macchina virtuale: configurazione di rete e software installato - hosts: localhost tasks: - name: Create a VM vmware_guest: datacenter: ITERBDCT001 cluster: ITERBCLR001 name: node06 template: "Ubuntu 16.04.4 server" state: poweredon template: "Ubuntu 16.04.4 server" networks: - ip: 172.16.3.178 netmask: 255.255.254.0 customization: dns_servers: - 172.16.2.1 domain: smeup.com ... - name: Install apache apache2_module: state: present
  • 5. Terraform Esempio di file .tf resource "openstack_compute_keypair_v2" "terraform" { name = "terraform" public_key = "${file("${var.ssh_key_file}.pub")}" } resource "openstack_networking_network_v2" "terraform" { name = "terraform" admin_state_up = "true" } resource "openstack_networking_subnet_v2" "terraform" { name = "terraform" network_id = "${openstack_networking_network_v2.terraform.id}" cidr = "10.0.0.0/24" ip_version = 4 dns_nameservers = ["8.8.8.8", "8.8.4.4"] }
  • 6. Kubernetes https://github.com/smeup/as400-smeup-api Deployment apiVersion: extensions/v1beta1 kind: Deployment metadata: name: as400-smeup-api spec: replicas: 2 args: ["--deployFromGAV", "com.smeup:as400-smeup-api:1.0.5", "--additionalRepository", "http://mauer.smeup.com/nexus/repository/releases"] valueFrom: secretKeyRef: name: as400-smeup-user-pass key: as400.pwd readinessProbe: httpGet: path: /as400-smeup-api/fun/F(%3B%3B) port: 8080 initialDelaySeconds: 10 periodSeconds: 30
  • 8. Kubernetes Service apiVersion: v1 kind: Service metadata: name: as400-smeup-api spec: type: NodePort ports: - port: 80 targetPort: 8080 nodePort: 30000 selector: app: as400-smeup-api
  • 11. Conclusione ●Infratruttura come codice versionabile ad esempio in Github o GitLab (a breve!) ●Aggiornamento dell’infrastruttura e delle applicazioni installate senza interruzione di servizio