How to - ENG
#
How to
RPA Service Deployment Guide
1. Purpose of this guide
This guide describes the standard process for preparing, deploying, and updating RPA services developed by Automators within the working group.
#The Guidaaim alis rilascioto deiensure servizithat RPA
##service 1.is Obiettivo della guida
Questa guida descrive il processo standard per preparare, rilasciare e aggiornare i servizi RPA sviluppati dagli Automator all’interno del gruppo di lavoro.
L’obiettivo è garantire che ogni servizio venga rilasciatodeployed in modoan ordinato,organized, tracciabile,traceable, ripetibileand erepeatable conway, ilwith minoras numerofew possibileunexpected diissues imprevisti,as rispettandopossible, lefollowing best practicethe Python, Docker, GitLabGitLab, eand DevOps adottatebest dalpractices gruppoadopted RPA.by the RPA group.
Per“Service “rilasciodeployment” dimeans uninstalling servizio”and sirunning intendea l’installazioneservice eon l’esecuzionea delremote serviziomachine su una macchina remota, utilizzandousing Docker Compose, immaginiimages pubblicatepublished sulto registrythe repository’s GitLab delregistry, repositoryand eenvironment-specific fileconfiguration difiles.
2. perRoles ambiente.involved
2.1 RPA Developer / Team Lead
Responsible for developing the service and preparing the technical aspects of deployment.
---Responsibilities include:
#
##
Ègroup’s ilPython responsabileand dello sviluppo del servizio e della preparazione tecnica del rilascio.
Si occupa di:
- sviluppare il codice;- rispettare leDocker best practicepractices;
.env file 2.2 DevOps team
The team responsible for installing or updating the service on remote machines.
##Responsibilities include:
.env files, and any required attachments;
installing or updating the service on the specified VM;
configuring any required DNS records;
checking that the service has started correctly;
communicating that the work is complete.
2.23 TeamRPA DevOpsgroup
The group that owns the process, best practices, and governance of RPA services.
ÈResponsibilities il team responsabile dell’installazione o aggiornamento del servizio sulle macchine remote.include:
Si
-standards;
## 2.3 Gruppo RPA
È il gruppo proprietario del processo, delle best practice e della governance dei servizi RPA.
Si occupa di:
- definire gli standard tecnici;- mantenere le convenzioni comuni;- garantire la tracciabilità dei rilasci;- condividere informazioni operative, come VM disponibili, ambienti e DNS.
---
#
3. StrumentiTools utilizzatiused
##
3.1 GitLab
GitLab èis utilizzatoused per:to:
-
##tags.
3.2 Docker eand Docker Compose
Docker èis utilizzatoused perto containerizzarecontainerize ilthe servizioRPA RPA.service.
Docker Compose èis utilizzatoused perto definiredefine l’esecuzionehow delthe servizioservice neiruns diversiin ambienti:the different environments:
-
##
3.3 GitLab Container Registry
The repository’s GitLab registry contains the service’s Docker images.
IlThe registry GitLab delentire repository contieneis lenot immaginideployed Dockerto delremote servizio.environments. Instead, the following are used:
Negli
- il fileenvironment’s Docker Compose dell’ambiente;-file;
.env`env ##the image.
3.4 Bitwarden
Bitwarden èis utilizzatoused perto salvaresecurely estore condividereand share environment .env files.
The .env files must be stored in modo sicuro i file `.env` degli ambienti.
I file `.env` devono essere salvati nella raccoltathe RPA seguendocollection lausing the following naming convention:
```text
env_<ambienteenvironment>_<nome_automazioneautomation_name>
Examples:
```
env_dev_automation-name
Esempi:
```textenv_dev_nome-automazioneenv_coll_nome-automazioneenv_prod_nome-automazione
```
##
3.5 Sistema diDevOps ticketing DevOpssystem
IlThe sistema diDevOps ticketing DevOpssystem èis utilizzatoused perto richiedere:request:
-
- delivery
diofnuovinewmicroservizi;-microservices;
.env ##
3.6 File Move to Prod
Il file Move to Prod èfile
il
The Move to Prod file condivisois usatothe pershared tracciarefile leused informazionito operativetrack deioperational rilasci.deployment information.
Contiene,Among traother lethings, altreit cose:contains:
-
---
#
4. Struttura attesa del repository
Prima di qualunque rilascio, ilExpected repository devestructure
rispettare
Before leany deployment, the repository must comply with the RPA group’s Python and Docker best practice Python e Docker del gruppo RPA.practices.
##
4.1 StrutturaCode delstructure
Application code must be located in the following folder:
src/
Il codice applicativo deve essere contenuto all’interno della cartella:Example:
```textsrc/
repository/
```
Esempio:
```textrepository/
├── src/
│ └── ...
├── docker-compose.local.yml
├── docker-compose.dev.yml
├── docker-compose.coll.yml
├── docker-compose.prod.yml
├── .env.example
├── Dockerfile
├── pyproject.toml
└── README.md
```
##
4.2 Required Docker Compose richiestifiles
Devono essere presenti i Docker Compose relativifiles aglimust ambientibe previsti:provided for the planned environments:
```text
docker-compose.local.yml
docker-compose.dev.yml
docker-compose.coll.yml
docker-compose.prod.yml
```
LaThe naming convention puòmay esserebe adattataadapted aglito standardthe effettivigroup’s delactual gruppo,standards, mabut deveit esseremust coerentebe econsistent facilmenteand riconoscibile.easily recognizable.
##
4.3 Environment file
At least one example file must be provided, such as:
.env.example
The .env.example file must contain all variables required by the service, without any actual sensitive values.
Deve essere presente almeno un file di esempio, ad esempio:Example:
```text.env.example
```
Il file `.env.example` deve contenere tutte le variabili necessarie al servizio, senza valori sensibili reali.
Esempio:
```env
APP_ENV=local
LOG_LEVEL=INFO
DB_HOST=
DB_PORT=
DB_NAME=
DB_USER=
DB_PASSWORD=
SECRET_KEY=
```
##
4.4 Volume mounts
Mount deipaths volumi
Ithe mount dei varivarious Docker Compose devonofiles partiremust dallabe cartellarelative correnteto delthe repository.current repository folder.
EsempioCorrect corretto:example:
```yaml
volumes:
- ./data:/app/data
- ./logs:/app/logs
Example to avoid:
```
Esempio da evitare:
```yaml
volumes:
- /home/user/project/data:/app/data
Absolute local paths must not be used in Compose files intended for deployment, because they are not portable across environments and machines.
4.5 Docker images
Compose files for remote environments must not require building the code from the full repository.
```The remote environment must use images already published to the GitLab registry.
I path assoluti locali non devono essere usati nei Compose destinati al rilascio, perché non sono portabili tra ambienti e macchine diverse.Example:
## 4.5 Immagini Docker
Nei Compose degli ambienti remoti non deve essere necessario buildare il codice dal repository completo.
L’ambiente remoto deve usare immagini già pubblicate sul registry GitLab.
Esempio:
```yaml
services:
automazione:
image: registry.gitlab.com/gruppo/progetto/nome-servizio:dev-latest
env_file:
- .env
Alternatively, depending on the versioning strategy:
```
Oppure, in base alla strategia di versionamento:
```yaml
services:
automazione:
image: registry.gitlab.com/gruppo/progetto/nome-servizio:v1.2.3
```
##
4.6 Label per Continuous Delivery labels
If the service needs to support automatic updates through CD, the Compose file must include the labels required by the group’s standard.
SeThe illabels serviziomust deveenable esserethe aggiornabilesystem automaticamenteto tramite CD, il Compose deve includere le label previste dallo standard del gruppo.identify:
LeIllustrative label devono permettere al sistema di riconoscere:example:
- servizio;- ambiente;- immagine da monitorare;- strategia di aggiornamento.
Esempio indicativo:
```yaml
labels:
- "rpa.cd.enabled=true"
- "rpa.cd.environment=dev"
- "rpa.cd.service=nome-automazione"
The actual labels must follow the standard defined by the RPA/DevOps group.
5. Differences between local and remote execution
5.1 Local execution
The entire repository is available locally.
```The developer can therefore:
The service can be tested locally in three ways:
5.2 Remote execution
The entire repository is not copied to the remote environment.
LeThe labelservice effettiveruns devono seguire lo standard definito dal gruppo RPA/DevOps.using:
---
#
## 5.1 Esecuzione locale
In locale è presente l’intero repository.
Lo sviluppatore può quindi:
- eseguire il codice direttamente sulla macchina;- modificare il codice;- buildare l’immagine;- eseguire il servizio tramite Compose local;- montare cartelle locali;- fare debug completo.
In locale il servizio può essere testato in tre modalità:
1. esecuzione a crudo sulla macchina;2. esecuzione Dockerizzata con Compose local;3. esecuzione Dockerizzata con Compose di ambiente, ad esempio dev.
## 5.2 Esecuzione su ambiente remoto
Nell’ambiente remoto non viene copiato l’intero repository.
Il servizio viene eseguito usando:
-environment’s Docker Compose dell’ambiente;-file;
.env`env This means the remote service must be self-sufficient using the image, Compose file, and configuration.
6. Deployment environments
Ideally, deployments progress through three environments:
6.1 Development
An environment used to check the service’s behavior in a remote, non-production setting.
QuestoIt significais cheused ilto serviziovalidate:
.env configuration;
connections to external systems;
the service’s overall behavior.
6.2 Acceptance testing
An environment used for testing under conditions closer to production.
It is used to validate:
6.3 Production
The final environment in which the service runs for operational use.
It requires greater attention to:
6.4 Skipping environments
Depending on urgency, criticality, or the nature of the development work, some steps may be skipped.
Examples:
Skipping one or more environments must be a partiredeliberate daand immagine,justified Composedecision, ebecause configurazione.it reduces the level of progressive verification.
7. Preliminary phase: local validation
Before opening a deployment ticket, the developer must verify that the service works correctly locally.
7.1 Testing the service directly on the machine
The first test consists of running the service directly on the local machine.
---Objectives:
#
Idealmente i rilasci seguono tre ambienti:
1. sviluppo;2. collaudo;3. produzione.
## 6.1 Sviluppo
Ambiente usato per verificare il comportamento del servizio in un contesto remoto non produttivo.
Serve per validare:
- immagine Docker;- Docker Compose;- configurazione `.env`;- connessioni verso sistemi esterni;- comportamento generale del servizio.
## 6.2 Collaudo
Ambiente usato per test più vicini alla produzione.
Serve per validare:
- stabilità;- dati e configurazioni più rappresentativi;- integrazioni;- test utente o test funzionali finali.
## 6.3 Produzione
Ambiente finale in cui il servizio viene eseguito per l’utilizzo operativo.
Richiede maggiore attenzione su:
- credenziali;- DNS;- configurazioni definitive;- disponibilità della VM;- tracciabilità;- impatto sugli utenti;- rollback.
## 6.4 Salto degli ambienti
In base a urgenza, criticità o caratteristiche dello sviluppo, alcuni step possono essere saltati.
Esempi:
- rilascio diretto in collaudo;- rilascio diretto in produzione;- aggiornamento rapido di una fix urgente.
Il salto di uno o più ambienti deve essere consapevole e motivato, perché riduce il livello di verifica progressiva.
---
# 7. Fase preliminare: validazione locale
Prima di aprire un ticket di rilascio, lo sviluppatore deve verificare che il servizio funzioni correttamente in locale.
## 7.1 Test del servizio a crudo
Il primo test consiste nell’eseguire il servizio direttamente sulla macchina locale.
Obiettivo:
- verificare che il codicethe Python funzioni;-code verificareworks;
Example:
Esempio:
```bash
python -m src.main
Alternatively, depending on the project structure:
```
Oppure, in base alla struttura del progetto:
```bash
python src/main.py
7.2 Testing with the local Compose file
The second test consists of running the service using the local Compose file.
```Example:
## 7.2 Test con Compose local
Il secondo test consiste nell’eseguire il servizio tramite Compose local.
Esempio:
```bash
docker compose -f docker-compose.local.yml up --build
Objectives:
7.3 Testing with an environment-specific Compose file
After testing the local Compose file, testing at least the dev Compose file is recommended.
```Example:
Obiettivo:
- verificare Dockerfile;- verificare build dell’immagine;- verificare mount locali;- verificare gestione env;- verificare porte e volumi;- verificare comportamento containerizzato.
## 7.3 Test con Compose di ambiente
Dopo il Compose local, è consigliato testare almeno il Compose dev.
Esempio:
```bash
docker compose -f docker-compose.dev.yml --env-file .env.dev up
Objectives:
```
Obiettivo:
-that verificarethe cheimage l’immagineis siacompatible compatibilewith conthe ilremote Compose remoto;-file;
8. Pre-deployment checklist
Before requesting deployment, verify that:
---
#
Primain dithe richiederesrc/ ilfolder;
- il codice sia contenuto nella cartella `src/`;- siano presenti i Compose
.env file .env` dell’ambiente sia stato preparato;
- ilenv file .env file 9. Building and publishing the Docker image
The Docker image can be published in two ways:
9.1 Building through CI
The preferred approach is an automatic build through a CI pipeline.
---The pipeline can be triggered by:
The image should have a clear tag.
# 9. Build e pubblicazione dell’immagine DockerExamples:
L’immagine Docker può essere pubblicata in due modalità:
1. tramite CI GitLab;2. manualmente dall’ambiente locale dello sviluppatore.
## 9.1 Build tramite CI
La modalità preferibile è la build automatica tramite pipeline CI.
La pipeline può essere triggerata da:
- push su branch;- merge;- tag di versione;- commit specifico;- workflow manuale.
L’immagine dovrebbe essere taggata in modo chiaro.
Esempi:
```text
dev-latest
coll-latest
prod-latest
v1.2.3
commit-<sha>
A recommended strategy is to use both environment tags and immutable tags.
```Example:
Una strategia consigliata è avere sia tag ambientali sia tag immutabili.
Esempio:
```text
dev-latest
v1.2.3
commit-a1b2c3d
This way:
```
In
dev-latest -updates;
v1.2.3`3 commit-<sha>` 9.2 Manual builds
Alternatively, the image can be built locally and pushed manually.
##Illustrative 9.2 Build manualeexample:
In alternativa, l’immagine può essere buildata localmente e pushata manualmente.
Esempio indicativo:
```bash
docker build -t registry.gitlab.com/gruppo/progetto/nome-servizio:dev-latest .
docker push registry.gitlab.com/gruppo/progetto/nome-servizio:dev-latest
Manual builds must be used with care, because they are less traceable than a CI pipeline.
10. Preparing the .env file
The environment’s .env file must be derived from the local file or the .env.example file.
```Each environment must have its own specific, independent variables.
La build manuale deve essere usata con attenzione, perché è meno tracciabile rispetto a una pipeline CI.
---
# 10. Preparazione del file `.env`
Il file `.env` dell’ambiente deve essere derivato dal file locale o dal file `.env.example`.
Ogni ambiente deve avere variabili specifiche e indipendenti.
##
10.1 VariabiliVariables dato renderemake specificheenvironment-specific
The ambientefollowing must differ between environments, where applicable:
Devono essere diverse per ogni ambiente, quando applicabile:Example:
- password utenti;- password database;- secret key;- token API;- connection string;- credenziali di servizio;- endpoint;- nomi database;- bucket;- utenti applicativi;- chiavi di cifratura;- configurazioni di integrazione.
Esempio:
```env
APP_ENV=dev
LOG_LEVEL=INFO
DB_HOST=db-dev.internal
DB_PORT=5432
DB_NAME=automazione_dev
DB_USER=automazione_dev_user
DB_PASSWORD=<password-dev>
SECRET_KEY=<secret-dev>
```
##
10.2 SalvataggioStoring su Bitwarden
Al termine della preparazione, ilthe file `in Bitwarden
Once prepared, the . env`envdevefile esseremust salvatobe stored in Bitwarden nellain raccoltathe RPA.RPA collection.
Naming convention:
```text
env_<ambienteenvironment>_<nome_automazioneautomation_name>
Examples:
env_dev_recupero-pratiche
env_coll_recupero-pratiche
env_prod_recupero-pratiche
```This allows anyone with authorization to:
Esempi:
```textenv_dev_recupero-praticheenv_coll_recupero-praticheenv_prod_recupero-pratiche
```
Questoenvironment permetteconfiguration;
- recuperare l’environment;- eseguire debug locali;- verificare configurazioni;- recuperare credenziali di connessione;- aggiornare il servizio in modo controllato.
##
10.3 CreazioneCreating dela Bitwarden Send
DopoAfter averstoring salvatothe il.env filefile, `.env`, è necessario creare un Bitwarden Send.
Il Send può contenere:
- il contenuto testuale del file `.env`;- oppure direttamente il file `.env`.
Il link del Send dovrà essere allegato al ticket DevOps.
---
# 11. Apertura del ticket di delivery microservizio
Per richiedere un nuovo rilascio, aprire un ticket nel sistema DevOps.
## 11.1 Tipologia ticket
La tipologia da selezionare è:
```textDelivery microservizio
```
Il ticket deve essere contestualizzato nell’ambiente RPA.
## 11.2 Ambiente remoto
Nel ticket deve essere specificato l’ambiente di rilascio:
- sviluppo;- collaudo;- produzione.
Deve inoltre essere indicata la destinazione:
- cloud;- quartier generale;- VM dedicata.
La VM deve essere scelta in base alla disponibilità riportata nel file Move to Prod, condiviso nel canale Teams del gruppo Python.
## 11.3 Informazioni da inserire nel ticket
Il ticket deve contenere almeno:
- nome del servizio;- repository GitLab;- ambiente target;- VM target;- Docker Compose da utilizzare;- immagine Docker da utilizzare;- tag immagine;- linka Bitwarden Send delmust be created.
The Send can contain:
.env file;
or the .env file The richiesti;-Send eventualilink filemust allegatibe daattached rilasciare;-to eventualithe cartelleDevOps di destinazione dei file;- eventuali note operative;- eventuali dipendenze o prerequisiti.ticket.
##
11.4 FileOpening daa allegaremicroservice odelivery linkareticket
AlTo request a new deployment, open a ticket devonoin esserethe allegatiDevOps o referenziati:system.
11.1 Ticket type
-Select Dockerthe Composefollowing relativotype all’ambiente;-(Microservice Bitwarden Send del file `.env`;- eventuali Excel di supporto;- eventuali shape file;- eventuali file dati;- eventuali template;- eventuali configurazioni non incluse nell’immagine.delivery):
Delivery microservizio
IThe fileticket chemust nonbe risiedono nell’immagine Docker devono essere esplicitamente indicati, insieme al pathplaced in cuithe DevOpsRPA dovrà posizionarli.context.
Esempio:
11.2 Remote environment
```textAllegare il file input_template.xlsx nella cartella ./data/templates/Allegare gli shapefile nella cartella ./data/shapes/
```
---
# 12. DNS e pubblicazione esterna
Se il servizio richiede pubblicazione esterna, nelThe ticket devonomust esserespecify indicatithe ideployment DNS necessari.environment:
ComeIt bestmust practice,also ispecify DNSthe devono risiedere sotto i domini standard del gruppo.destination:
Per
```text.rpa.collaudo-live.xyz
```
Permust produzione:
```text.rpa.eagleprojects.cloud
```
Esempion indicativi:
```textnome-servizio.rpa.collaudo-live.xyznome-servizio.rpa.eagleprojects.cloud
```
Lain naming convention effettiva deve essere coerente con gli standard del gruppo e approvata da DevOps.
---
# 13. Completamento del rilascio
Una volta che DevOps ha completato la lavorazione del ticket, lo sviluppatore deve verificare il servizio.
## 13.1 Verifiche post-rilascio
Verificare che:
- il container sia avviato;- il servizio risponda correttamente;- i log non presentino errori critici;- le variabili ambiente siano corrette;- eventuali file allegati siano presenti;- eventuali DNS siano funzionanti;- eventuali integrazioni siano operative;- eventuali scheduler o job siano attivi;- eventuali endpoint siano raggiungibili.
## 13.2 Aggiornamento del file Move to Prod
A rilascio completato, aggiornare il filethe Move to Prod nellefile, colonneshared previste.in the Python group’s Teams channel.
11.3 Information to include in the ticket
The ticket must contain at least:
.env file;
any required DNS names;
any attached files to deploy;
any destination folders for those files;
any operational notes;
any dependencies or prerequisites.
11.4 Files to attach or link
The ticket must include attachments or references to:
.env file;
any supporting Excel files;
any shapefiles;
any data files;
any templates;
any configurations not included in the image.
Files that are not included in the Docker image must be explicitly identified, together with the path where DevOps must place them.
InserireExample:
Attach the input_template.xlsx file for placement in ./data/templates/
Attach the shapefiles for placement in ./data/shapes/
12. DNS and external access
If the service requires external access, the required DNS names must be specified in the ticket.
-As nomea servizio;-best ambiente;- VM utilizzata;-practice, DNS utilizzato;-names repository;-must eventualifall note;-under datathe rilascio;-group’s riferimentostandard ticketdomains.
For development and acceptance testing:
.rpa.collaudo-live.xyz
For production:
.rpa.eagleprojects.cloud
Illustrative examples:
nome-servizio.rpa.collaudo-live.xyz
nome-servizio.rpa.eagleprojects.cloud
The actual naming convention must be consistent with the group’s standards and approved by DevOps.
13. Completing deployment
IlOnce rilascioDevOps èhas consideratocompleted conclusothe solowork dopo:on the ticket, the developer must verify the service.
13.1 Post-deployment checks
1.Verify completamentothat:
13.2 Updating the Move to Prod.Prod file
Once deployment is complete, update the appropriate columns in the Move to Prod file.
---Enter at least:
#Deployment 14.is Aggiornamentoconsidered deicomplete servizionly esistentiafter:
Gli
-is immaginecompleted;
14. Updating existing services
Updates may involve:
.env file;
Docker Compose;##
14.1 AggiornamentoUpdating immaginethe Docker image
SeIf ilthe servizioservice èhas statobeen configuratoconfigured conwith lethe corrette label dicorrect Continuous Delivery,Delivery l’aggiornamentolabels, dell’immaginethe puòimage avvenirecan automaticamente.be updated automatically.
In questothis casocase, èsimply sufficientepublish pubblicarethe ilnew nuovoimage tagunder `latest`the relativoenvironment’s all’ambiente.latest tag.
Esempi:Examples:
```text
dev-latest
coll-latest
prod-latest
```
Il sistema diThe CD rileveràsystem lawill nuovadetect immaginethe enew aggiorneràimage iland servizioupdate secondothe laservice configurazioneaccording prevista.to the configured settings.
##
14.2 AggiornamentoUpdating tramitethrough CI
Recommended approach:
Modalità
1.the modificarecode;
##been updated automatically;
14.3 AggiornamentoUpdating manualethe immagineimage manually
For a manual build:
In caso di build manuale:
```bash
docker build -t registry.gitlab.com/gruppo/progetto/nome-servizio:dev-latest .
docker push registry.gitlab.com/gruppo/progetto/nome-servizio:dev-latest
After pushing, verify that the remote system has picked up the update.
```
15. Updating .env, Compose, or local files
DopoUpdates ilthat push,involve verificaremore chethan iljust sistema remoto abbia recepito l’aggiornamento.
---
# 15. Aggiornamento di `.env`, Compose o file locali
Gli aggiornamenti che non riguardano solamente l’immaginethe Docker devonoimage passaremust tramitego ticketthrough DevOps.a DevOps ticket.
##
15.1 TipologiaTicket tickettype
Use the following type (Microservice update):
La tipologia da usare è:
```text
Aggiornamento microservizio
```
##
15.2 InformazioniRequired richiesteinformation
Specify the following in the ticket:
Nel
-update;
.env 15.3 Updating the .env file
If the .env file da inserire o sostituire;- path di destinazione;- eventuali istruzioni di riavvio;- eventuali verifiche da eseguire.changes:
##
Senew cambia il file `.env`:
1. aggiornare il contenuto;2. salvare la nuova versioneversion in Bitwarden;3.
##
15.4 AggiornamentoUpdating delthe Compose file
SeIf cambia ilthe Docker Compose:Compose file changes:
1.
##
15.5 AggiornamentoUpdating dilocal filefiles
If local files need to be added or modified:
Se devono essere aggiunti o modificati file locali:Example:
-
Replace allegare i file al ticket;
- indicare il path di destinazione;
- specificare se sostituiscono file esistenti;
- indicare se è necessario riavviare il servizio.
Esempio:
```textSostituire il filethe configurazione.xlsx nellafile cartellain ./data/config/Aggiungere
laAdd cartellathe ./data/shapes/ confolder ilwith contenutothe allegatoRiavviareattached ilcontents
servizioRestart althe termineservice dellaonce copia
```
---
#
16. TemplateMicroservice delivery ticket Deliverytemplate
Title:
```textTitolo:
[DELIVERYMICROSERVICE MICROSERVIZIO]DELIVERY] <nome-servizioservice-name> - <ambienteenvironment>
Descrizione:RichiedoDescription:
ilI rilasciorequest deldeployment servizioof the RPA service <nome-servizioservice-name> sull’ambienteto the <dev/collaudo/acceptance testing/prod>.
Repositoryenvironment.
GitLab:
GitLab repository:
<repository link>
repository>
Ambiente:
<dev/collaudo/acceptance testing/prod>
Destinazione:
Destination:
<cloud/quartier generale/VM dedicata>
VM target:<nomeheadquarters/dedicated VM>
ImmagineTarget Docker:
VM:
<VM name>
Docker image:
<registry/image:tag>
Docker Compose:
<allegatoattachment oor link>
File
.env:
env file:
<link Bitwarden Send link>
Required DNS richiesti:
names:
<dnsrequired richiestiDNS oppurenames or N/A>
FileAdditional aggiuntivi:
files:
<elencolist file,of pathfiles, didestination destinazione,paths, eventualiany notenotes>
NoteOperational operative:
notes:
<eventualiany istruzionispecific specificheinstructions>
VerificheRequired richieste:
checks:
- avviocontainer container
startup
- verificalog log
check
- verifica endpoint/scheduler/job
check
- verificaDNS DNS,check, seif presente
```
---
#
17. TemplateMicroservice update ticket Aggiornamentotemplate
Title:
```textTitolo:
[AGGIORNAMENTOMICROSERVICE MICROSERVIZIO]UPDATE] <nome-servizioservice-name> - <ambienteenvironment>
Descrizione:RichiedoDescription:
l’aggiornamentoI delrequest servizioan update to the RPA service <nome-servizioservice-name> sull’ambientein the <dev/collaudo/acceptance testing/prod>.
Servizio:
environment.
Service:
<nome-servizioservice-name>
Ambiente:
Environment:
<dev/collaudo/acceptance testing/prod>
VM:
<nomeVM VMname>
TipoUpdate aggiornamento:
type:
- immagineDocker Docker
image
- .env file
.env
- Docker Compose
- filelocal locali
files
- DNS
- altro
DettaglioChange modifica:
details:
<descrizionedetailed dettagliatadescription dellaof modificathe change>
NuovaNew immagineDocker Docker:
image:
<registry/image:tag oppureor N/A>
Nuovo fileNew .env:
env file:
<link Bitwarden Send oppurelink or N/A>
NuovoNew Docker Compose:
<allegato/attachment/link oppureor N/A>
FileFiles dato aggiungere/sostituire:
add/replace:
<elencolist fileof efiles pathand didestination destinazionepaths oppureor N/A>
Restart required:
<yes/no>
Operational notes:
<any additional details>
18. Final deployment checklist
Before considering deployment complete, verify that:
Riavvio
Note operative:<eventuali dettagli aggiuntivi>
```
---
# 18. Checklist finale rilascio
Prima di considerare concluso il rilascio, verificare:
-DevOps ticket DevOpsis completato;-completed;
.env file ---
#stakeholders have been informed.
19. RegolePractical praticherules dato ricordareremember
##
19.1 NonDo rilasciarenot codicedeploy nonuntested testatocode
Before deployment, the service must have been tested at least:
Prima
-
##environment.
19.2 NonDo committarenot filecommit `.env`env files
IActual file.env `.env`files realimust nonnot devonobe esserestored salvatiin nelthe repository.
NelThe repository devemust esserecontain presenteonly soloan unexample filefile, disuch esempio, come:as:
```text
.env.example
```
##
19.3 NonDo usarenot pathuse assolutiabsolute localilocal neipaths in Compose files
Mount paths must be relative to the current folder:
I mount devono partire dalla cartella corrente:
```yaml
./data:/app/data
They must not use absolute paths on the developer’s machine:
```
E non da path assoluti della macchina dello sviluppatore:
```yaml
/home/nomeutente/progetto/data:/app/data
```
##
19.4 NonDo dipenderenot daldepend on the full repository completo in remotoremotely
In ambientea remotoremote ilenvironment, serviziothe deveservice funzionaremust con:work with:
-
.env`;
-env ##external files.
19.5 AggiornareAlways sempreupdate Move to Prod
Il fileThe Move to Prod èfile necessariois perrequired mantenereto tracciabilitàmaintain operativaoperational deitraceability serviziof rilasciati.deployed services.
OgniEvery rilasciodeployment oor variazionesignificant significativachange devemust esserebe riportatarecorded nelin the file.
---
#
20. FlussoProcess sinteticooverview
##
New Nuovodeployment
Develop ```textSviluppothe codice
code
↓Validazione
Validate the repository
↓
Test adirectly crudo
on the machine
↓
Test the local Compose local
file
↓
Test Composethe dev/coll/prod
Compose file
↓
Build immagine
the image
↓
Push immaginethe suimage to the GitLab Registry
↓Preparazione
filePrepare the environment’s .env ambiente
file
↓Salvataggio
Store the .env sufile in Bitwarden
↓Creazione
Create a Bitwarden Send
↓Scelta
Select a VM da Move to Prod↓Apertura ticket Delivery microservizio↓Lavorazione DevOps↓Verifica servizio↓Aggiornamento Move to Prod↓Rilascio concluso
```
## Aggiornamento servizio
```textModifica codice/configurazione↓Test locale↓Se cambia solo immagine: push nuovo tag latest ambiente verifica aggiornamento automatico CD↓Se cambiano env/compose/file: aggiornamento Bitwarden se necessario apertura ticket Aggiornamento microservizio lavorazione DevOps↓Verifica servizio↓Aggiornamentofrom Move to Prod
se↓
necessario
```./
Service update
Modify the code/configuration
↓
Test locally
↓
If only the image changes:
push the new image under the environment’s latest tag
verify the automatic CD update
↓
If env/compose/files change:
update Bitwarden if necessary
open a microservice update ticket
DevOps performs the work
↓
Verify the service
↓
Update Move to Prod if necessary