SlideShare ist ein Scribd-Unternehmen logo
1 von 12
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
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!

Weitere ähnliche Inhalte

Ähnlich wie SAL 2018 - DevOps

Lezione 9: Web Service in Java
Lezione 9: Web Service in JavaLezione 9: Web Service in Java
Lezione 9: Web Service in JavaAndrea Della Corte
 
High specialized vm on open stack cloud
High specialized vm on open stack cloudHigh specialized vm on open stack cloud
High specialized vm on open stack cloudGabriele Baldoni
 
Implementazione di un ambiente in alta affidabilità
Implementazione di un ambiente in alta affidabilitàImplementazione di un ambiente in alta affidabilità
Implementazione di un ambiente in alta affidabilitàAlfredo Parisi
 
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 1Alfonso Martino
 
MySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle Openstack
MySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle OpenstackMySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle Openstack
MySQL Tech Tour 2016 - Database-as-a-Service con MySQL e Oracle OpenstackPar-Tec S.p.A.
 
Dev Ops Italia 2015 - Per capire Desired State Configuration
Dev Ops Italia 2015 - Per capire Desired State ConfigurationDev Ops Italia 2015 - Per capire Desired State Configuration
Dev Ops Italia 2015 - Per capire Desired State ConfigurationGiulio Vian
 
Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...
Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...
Un'Infrastruttura di Sviluppo Web Enterprise Distribuita Basata su Modelli Pa...Natale Vinto
 
Livin' with Docker - dallo sviluppo alla produzione
Livin' with Docker - dallo sviluppo alla produzioneLivin' with Docker - dallo sviluppo alla produzione
Livin' with Docker - dallo sviluppo alla produzionegiacomos
 
MongoDB User Group Padova - Overviews iniziale su MongoDB
MongoDB User Group Padova - Overviews iniziale su MongoDBMongoDB User Group Padova - Overviews iniziale su MongoDB
MongoDB User Group Padova - Overviews iniziale su MongoDBStefano Dindo
 
Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]Valerio Radice
 
Joomla day 2010 Virtualizzare in locale pro e contro
Joomla day 2010 Virtualizzare in locale pro e controJoomla day 2010 Virtualizzare in locale pro e contro
Joomla day 2010 Virtualizzare in locale pro e controAndrea Adami
 
[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdf
[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdf[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdf
[Laravel Day 2022] Deploy di Laravel su AWS Lambda (from Zero to Hero).pdfFrancesco Liuzzi
 
Server linux samba in un dominio
Server linux samba in un dominioServer linux samba in un dominio
Server linux samba in un dominioSaverio Menin
 
Apache Maven - Gestione di progetti Java e build automation
Apache Maven - Gestione di progetti Java e build automationApache Maven - Gestione di progetti Java e build automation
Apache Maven - Gestione di progetti Java e build automationTiziano Serritella
 

Ähnlich wie SAL 2018 - DevOps (20)

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

Mehr von Mauro Sanfilippo

Mehr von Mauro Sanfilippo (10)

SAL 2018 - RaD 2018
SAL 2018 - RaD 2018SAL 2018 - RaD 2018
SAL 2018 - RaD 2018
 
SAL 2018 - RaD 2017
SAL 2018 - RaD 2017SAL 2018 - RaD 2017
SAL 2018 - RaD 2017
 
SAL 2018 - MES
SAL 2018 - MESSAL 2018 - MES
SAL 2018 - MES
 
SAL 2018 - Editor Web
SAL 2018 - Editor WebSAL 2018 - Editor Web
SAL 2018 - Editor Web
 
SAL 2018 - Web Performance
SAL 2018 - Web PerformanceSAL 2018 - Web Performance
SAL 2018 - Web Performance
 
SAL 2018 - Nego2
SAL 2018 - Nego2SAL 2018 - Nego2
SAL 2018 - Nego2
 
SAL 2018 - Dashboard
SAL 2018 - DashboardSAL 2018 - Dashboard
SAL 2018 - Dashboard
 
SAL 2018 - IOT Framework
SAL 2018 - IOT FrameworkSAL 2018 - IOT Framework
SAL 2018 - IOT Framework
 
SAL 2018 - A38
SAL 2018 - A38SAL 2018 - A38
SAL 2018 - A38
 
SAL 2018 - Ditech-News
SAL 2018 - Ditech-NewsSAL 2018 - Ditech-News
SAL 2018 - Ditech-News
 

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
  • 7.
  • 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