34 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
| Schritt 1:
 | |
| Hostsfile um Host erweitern
 | |
| 
 | |
| Schritt 2 - Playbooks anpassen:
 | |
| Host angeben (Variable hosts)
 | |
| Repository URL angeben (Variable odoo_repo_url)
 | |
| Passwörter setzen (Variablen odoo_config_admin_passwd, odoo_config_db_password, odoo_general_user_passwd)
 | |
| 
 | |
| Schritt 3:
 | |
| Die Playbooks wie in den nachfolgenden Beispielen beschrieben ausführen
 | |
| 
 | |
| [Odoo Test Instanz aufsetzen]
 | |
| 1. Playbook ausführen: ansible-playbook odoo-playboook/playbook-test.yml -i odoo-playboook/hosts --ask-become-pass
 | |
| 2. Auf den Server verbinden: ssh odoo-test@[host]
 | |
| 3. Public SSH Key kopieren und in Gitlab beim Projekt unter Settings/Repository eintragen: cat .ssh/id_rsa.pub
 | |
| 4. Playbook nochaml ausführen:  ansible-playbook odoo-playboook/playbook-test.yml -i odoo-playboook/hosts
 | |
| 
 | |
| [Odoo Prod Instanz aufsetzen]
 | |
| 1. Playbook ausführen: ansible-playbook odoo-playboook/playbook-prod.yml -i odoo-playboook/hosts
 | |
| 2. Auf den Server verbinden: ssh odoo-prod@[host]
 | |
| 3. Public SSH Key kopieren und in Gitlab beim Projekt unter Settings/Repository eintragen: cat .ssh/id_rsa.pub
 | |
| 4. Playbook nochaml ausführen:  ansible-playbook odoo-playboook/playbook-prod.yml -i odoo-playboook/hosts
 | |
| 
 | |
| [Nginx Server aufsetzen]
 | |
| 1. Variabel server_name anpassen
 | |
| 2. Playbook ausführen: ansible-playbook odoo-playboook/playbook-nginx.yml -i odoo-playboook/hosts
 | |
| 
 | |
| Hinweis: HTTPS ist derzeit nur für PROD möglich
 | |
| Probleme: Automatische Erstellung des Certificate und Private Key wird ausgeführt. Manchmal ist jedoch der Hash unterschiedlich.
 | |
| Ob die Hashwerte gleich sind kann wie folgt überprüft werden:
 | |
| sudo openssl x509 -in odoo_prod.crt -noout -modulus | openssl sha256
 | |
| sudo openssl rsa -in odoo_prod.key -noout -modulus | openssl sha256
 | |
| 
 |