diff options
author | 2025-07-14 21:36:01 +0200 | |
---|---|---|
committer | 2025-07-14 21:43:05 +0200 | |
commit | a35f4020a250534e8ed2cd95596aee3eb2094111 (patch) | |
tree | 2a15c54c7c7248c9cf2a6a4d8b835c7ca5b6d21d /istruzioni | |
download | openstack-master.tar.gz openstack-master.zip |
Diffstat (limited to 'istruzioni')
-rw-r--r-- | istruzioni | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/istruzioni b/istruzioni new file mode 100644 index 0000000..6263f77 --- /dev/null +++ b/istruzioni @@ -0,0 +1,133 @@ +# Prima di applicare questo, installare bridge-utils. +# Poi eseguire: +# netplan generate +# netplan apply +network: + version: 2 + renderer: networkd + ethernets: + ens3: + dhcp4: no + ens4: + dhcp4: no + ens5: + dhcp4: no + addresses: [192.168.200.10/24] + routes: + - to: 192.168.200.0/24 + via: 192.168.200.1 + metric: 100 + + bridges: + br-nat: + interfaces: [ens3] + dhcp4: true + dhcp4-overrides: + route-metric: 50 + nameservers: + addresses: [8.8.8.8, 1.1.1.1] + routes: + - to: default + via: 10.0.2.2 + + br-host: + interfaces: [ens4] + addresses: [192.168.100.10/24] + nameservers: + addresses: [8.8.8.8] + routes: + - to: 192.168.100.0/24 + via: 192.168.100.1 + metric: 100 + + + +Se l'ambiente prevede più schede di rete, delle quali una sola esce su internet, bisonga fare in +modo che il sistema esca sempre con quella. Quindi, bisognerebbe togliere il default, ad esempio, +alla scheda solo host (nel mio caso): + # ip route del default via 192.168.100.1 +O impostare una metrica più alta: + # ip route del default via 192.168.100.1 + # ip route replace default via 192.168.100.1 dev ens4 metric 150 + +INSTALLAZIONE ALL-IN-ONE OPENSTACK KOLLA-ANSIBLE +------------------------------------------------ + + + # apt-get update + # apt-get install git python3-dev libffi-dev gcc libssl-dev python3-venv bridge-utils + + $ python3 -m venv $HOME/python-env + $ source $HOME/python-env/bin/activate + $ pip install -U pip + $ pip install ansible-core >=2.15 + +# Provare l'installazione con stable/2025.1 anziché master + $ pip install git+https://opendev.org/openstack/kolla-ansible@master + + # mkdir -p /etc/kolla + $ sudo chown $USER:$USER /etc/kolla + + $ cp -r $HOME/python-env/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/ + + $ kolla-ansible install-deps + $ kolla-genpwd + + + + + + +# Scelta della distribuzione per kolla + $ nano /etc/kolla/globals.yml +# Cambiare: + kolla_base_distro: "ubuntu" + network_interface: "br-nat" # la rete NAT + neutron_external_interface: "br-host" # la rete host (non deve avere una rotta che la farebbe uscire su internet, io ho rimosso il default) + kolla_internal_vip_address: "10.0.2.100" + + +# Prima di procedere, creare il file ~/.ansible.cfg (serve per far chiedere la password quando cerca di fare sudo): + [privilege_escalation] + become = True + become_method = sudo + become_ask_pass = True + + +######################### +# Creato disk0.qcow2.v1 # +######################### + + + $ kolla-ansible bootstrap-servers -i $HOME/python-env/share/kolla-ansible/ansible/inventory/all-in-one + +# Cose da installare... + $ pip install docker + $ sudo apt-get install libdbus-1-dev libdbus-glib-1-dev pkg-config + $ pip install dbus-python + + + $ kolla-ansible prechecks -i $HOME/python-env/share/kolla-ansible/ansible/inventory/all-in-one + + $ kolla-ansible deploy -i $HOME/python-env/share/kolla-ansible/ansible/inventory/all-in-one + + +######################### +# Creato disk0.qcow2.v2 # +######################### + + +INSTALLAZIONE OPENSTACK CLI +--------------------------- + + $ pip install python-openstackclient -c https://releases.openstack.org/constraints/upper/master + + +# Per accedere all'interfaccia horizon, è necessario fare port forwarding su qemu, altrimenti tramite NAT non si riesce ad accedere. + + username: admin + pasword: vedere /etc/kolla/passwords.yml + + $ grep 'keystone_admin_password' /etc/kolla/passwords.yml + + |