Work in progress
Overview
Usiamo un meccanismo di CI/CD per cui:
- Esiste un git repo (xxx) unico sia per la parte controller che per la parte compute con 2 branch:
- Il branch 'main' viene usato nella cloud di produzione (environment 'production' di puppet)
- Il branch 'testing' viene usato nella cloud di test (environment 'testing' di puppet
- Il codice puppet che viene usato sta in cld-config. ma non si deve MAI modificare i sorgenti puppet direttamente su cld-config
- Modifiche al codice vanno implementate come pull request lavorando sulla propria postazione di lavoro. Una volta che sono approvate (e quindi mergiate nel branch main/testing) queste vengono automaticamente "scaricate" in cld-config
Setup iniziale dell'ambiente sul
Installare git-crypto
Copiare da cld-confi
xxxx
Verifica preliminare obbligatoria
Verificare che i repo di test e di produzione siano aggiornati
- cd /var/puppet/puppet_caracal_env_test/
- git status
- se c'e' qualcosa non committato nel repo centrale (web) va chiesto a chi ha fatto le modifiche e in caso committato
- git pull
- cd /var/puppet/puppet_caracal
- git status
- se c'e' qualcosa non committato nel repo centrale (web) va chiesto a chi ha fatto le modifiche e in caso committato
- git pull
Per modifiche in env test
Se devi modificare file nell'ambiente di test
- cd /var/puppet/puppet_caracal_env_test
- modifica i file
- git add file_modificati
- git commit --author=author_name -m "commit comment"
git push WARNING: Since August 2021 for the commit is required the personal token instead of the password! Follow this instruction to create a personal token and remember to save it. Then use the token instead of the old password otherwise you will get the message:
[root@cld-config puppet_xena_env_test]# git push
Username for 'https://github.com': federica.fanzago@cern.ch (proprio username)
Password for 'https://federica.fanzago@cern.ch@github.com': (mettere il token)
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/CloudPadovana/puppet_xena.git/'- cd /var/puppet/puppet_caracal
- git pull (in questo modo ricevi le modifiche appena fatte in env_test e committate nel repo centrale (web))
- git status
Per modifiche in env di produzione
Se devi modificare file nell'ambiente di produzione
- cd /var/puppet/puppet_caracal
- modifica i file
- git add file_modificati
- git commit --author=author_name -m "commit comment"
git push WARNING: Since August 2021 for the commit is required the personal token instead of the password! Follow this instruction to create a personal token and remember to save it. Then use the token instead of the old password otherwise you will get the message:
[root@cld-config puppet_xena_env_test]# git push
Username for 'https://github.com': federica.fanzago@cern.ch (proprio username)
Password for 'https://federica.fanzago@cern.ch@github.com': (mettere il token)
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/CloudPadovana/puppet_xena.git/'- cd /var/puppet/puppet_caracal_env_test
- git pull (in questo modo ricevi le modifiche appena fatte in produzione e committate nel repo centrale (web))
- git status