Adding a test version of kolla install
This commit is contained in:
commit
d07f9033aa
92
install-aio-openstack.sh
Executable file
92
install-aio-openstack.sh
Executable file
@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
IP="$1"
|
||||
|
||||
INTERNAL_INTERFACE="$2"
|
||||
EXTERNAL_INTERFACE="$3"
|
||||
|
||||
if [ -z "${IP}" ];then
|
||||
echo "Missing internal IP address"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${INTERNAL_INTERFACE}" ];then
|
||||
echo "Missing internal network interface"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ -z "${EXTERNAL_INTERFACE}" ];then
|
||||
echo "Missing externl network interface"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
dnf group install -y "Development Tools"
|
||||
dnf install -y python3.12-devel python3.12 cmake dbus-devel python3.12-pip pkgconfig glib2-devel
|
||||
|
||||
update-alternatives --set python3 /usr/bin/python3.12
|
||||
|
||||
#apt install -y build-essential python3-dev python3
|
||||
#apt install -y libdbus-1-dev cmake libspice-client-glib-2.0-dev
|
||||
#apt install -y python3-venv
|
||||
|
||||
python3 -m venv /opt/deploy
|
||||
source /opt/deploy/bin/activate
|
||||
|
||||
pip install -U pip
|
||||
|
||||
#pip install 'ansible>=4,<6'
|
||||
pip install 'ansible-core>=2.16,<=2.17'
|
||||
#pip install 'ansible>=7,<8'
|
||||
pip install ansible
|
||||
#pip install ansible-core
|
||||
#pip install ansible
|
||||
pip install dbus-python
|
||||
|
||||
pip install docker
|
||||
|
||||
pip install git+https://opendev.org/openstack/kolla-ansible@master
|
||||
|
||||
mkdir -p /etc/kolla
|
||||
|
||||
chown $USER:$USER /etc/kolla
|
||||
|
||||
cp -r /opt/deploy/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
|
||||
|
||||
cp /opt/deploy/share/kolla-ansible/ansible/inventory/all-in-one /opt/
|
||||
|
||||
source /opt/deploy/bin/activate
|
||||
|
||||
PYTHON=$(which python)
|
||||
|
||||
echo "${PYTHON}"
|
||||
|
||||
sed -i -e "s@ansible_connection=local.*@ansible_connection=local ansible_python_interpreter=/opt/deploy/bin/python@g" /opt/all-in-one
|
||||
|
||||
kolla-ansible install-deps
|
||||
|
||||
kolla-genpwd
|
||||
|
||||
sed -i -e 's@^\#kolla_base_distro: ".*@kolla_base_distro: "ubuntu"@g' \
|
||||
-e "s@^#network_interface.*@network_interface: \"${INTERNAL_INTERFACE}\"@g" \
|
||||
-e "s@^#neutron_external_interface.*@neutron_external_interface: \"${EXTERNAL_INTERFACE}\"@g" \
|
||||
-e 's@^#neutron_plugin_agent: .*@neutron_plugin_agent: "openvswitch"@g' \
|
||||
-e 's@^#enable_neutron_provider_networks.*@enable_neutron_provider_networks: "yes"@g' \
|
||||
-e 's@^#nova_compute_virt_type.*@nova_compute_virt_type: "kvm"@g' \
|
||||
-e 's@^#enable_haproxy:.*@enable_haproxy: "no"@g' \
|
||||
-e "s@^#kolla_internal_vip_address:.*@kolla_internal_vip_address: \"${IP}\"@g" \
|
||||
/etc/kolla/globals.yml
|
||||
|
||||
cd /opt && \
|
||||
kolla-ansible -i all-in-one prechecks && \
|
||||
kolla-ansible -i all-in-one bootstrap-servers && \
|
||||
kolla-ansible -i all-in-one deploy &&
|
||||
kolla-ansible -i all-in-one post-deploy
|
||||
|
||||
pip install python-openstackclient
|
||||
|
||||
grep keystone_admin_password /etc/kolla/passwords.yml
|
||||
|
||||
set +x
|
Loading…
Reference in New Issue
Block a user