일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- i3
- nfs-provisioner
- Kubernetes
- cloud-init
- Octavia
- Arch
- Kubeflow
- Docker
- archlinux
- ubuntu
- HTML
- yum
- libvirt
- OpenStack
- port open
- kolla
- Linux
- awx
- pacman
- kolla-ansible
- KVM
- k8s
- ceph
- ceph-ansible
- repository
- cephadm
- golang
- Ansible
- terraform
- grafana-loki
Archives
- Today
- Total
YJWANG
Install OpenStack (with kolla-ansible / without python-virtual-env) 본문
60.Cloud/60.OpenStack
Install OpenStack (with kolla-ansible / without python-virtual-env)
왕영주 2021. 3. 5. 14:19Install OpenStack (with kolla-ansible / without python-virtual-env)
refer to : https://docs.openstack.org/kolla-ansible/latest/user/quickstart.html
Minimal (Only core service) also only provider network interface
Prerequisite
Update package index
root@yjwang0-stack-01:~# apt update
Install python dependencies
root@yjwang0-stack-01:~# apt install -y python3-dev libffi-dev gcc libssl-dev
Install dependencies not using a virtual env
root@yjwang0-stack-01:~# apt install -y python3-pip
Install Ansible (Require at least 2.9 ver)
root@yjwang0-stack-01:~# apt -y install ansible
root@yjwang0-stack-01:~# ansible --version
ansible 2.9.6
Clone kolla , kolla-ansible git
root@yjwang0-stack-01:~# git clone https://github.com/openstack/kolla
root@yjwang0-stack-01:~# git clone https://github.com/openstack/kolla-ansible
Install requirements of kolla
and kolla-ansible
:
root@yjwang0-stack-01:~# pip3 install ./kolla
root@yjwang0-stack-01:~# pip3 install ./kolla-ansible
create /etc/koll
dir
sudo mkdir -p /etc/kolla
sudo chown $USER:$USER /etc/kolla
copy file for installation
cp -r kolla-ansible/etc/kolla/* /etc/kolla
cp kolla-ansible/ansible/inventory/* .
Config Ansible
ansible config file
root@yjwang0-stack-01:~# cat ./ansible.cfg
[defaults]
host_key_checking=False
pipelining=True
forks=100
check current config file path
root@yjwang0-stack-01:~# ansible --version
ansible 2.9.6
config file = /root/ansible.cfg
...
inventory
root@yjwang0-stack-01:~# cat multinode
# These initial groups are the only groups required to be modified. The
# additional groups are for more control of the environment.
[control]
# These hostname must be resolvable from your deployment host
control01 ansible_host=10.99.99.20
control02 ansible_host=10.99.99.21
control03 ansible_host=10.99.99.22
# The above can also be specified as follows:
#control[01:03] ansible_user=kolla
# The network nodes are where your l3-agent and loadbalancers will run
# This can be the same as a host in the control group
[network:children]
control
[compute]
compute01 ansible_host=10.99.99.23
compute02 ansible_host=10.99.99.24
[monitoring]
control01
...(이하 default)
confirm connection
root@yjwang0-stack-01:~# apt install sshpass
root@yjwang0-stack-01:~# ansible -i multinode all -m ping
Gen kolla password
root@yjwang0-stack-01:~# python3 ./kolla-ansible/tools/generate_passwords.py
root@yjwang0-stack-01:~# cat /etc/kolla/passwords.yml |grep keystone_admin_password
keystone_admin_password: D4sADozLQ5AuvhGBmzI7ZVbVI6DGu3FKzkwLLMwg
kolla globals.yml
root@yjwang0-stack-01:~# vim /etc/kolla/globals.yml
root@yjwang0-stack-01:~# grep -Ev '^$|^#' /etc/kolla/globals.yml
---
kolla_base_distro: "ubuntu" ## container base os가 ubuntu임
kolla_install_type: "source" ## openstack service를 git source에서 받아옴
kolla_internal_vip_address: "10.99.99.25" ## management traffic을 받을 floating IP
network_interface: "ens2" ## management interface
neutron_external_interface: "ens3" ## provider network interface
enable_openstack_core: "yes" ## openstack core project
Deploy
bootstrap servers
root@yjwang0-stack-01:~# cd kolla-ansible/tools/
root@yjwang0-stack-01:~/kolla-ansible/tools# ./kolla-ansible -i ../../multinode bootstrap-servers
Do pre-deployment checks for hosts:
root@yjwang0-stack-01:~/kolla-ansible/tools# ./kolla-ansible -i ../../multinode prechecks
Finally proceed to actual OpenStack deployment:
root@yjwang0-stack-01:~/kolla-ansible/tools# ./kolla-ansible -i ../../multinode deploy
Check OpenStack Containers
root@yjwang0-stack-01:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
341347c933cc kolla/ubuntu-source-horizon:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) horizon
45b185ad697d kolla/ubuntu-source-heat-engine:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) heat_engine
564f812be6cc kolla/ubuntu-source-heat-api-cfn:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) heat_api_cfn
24d470d878cf kolla/ubuntu-source-heat-api:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) heat_api
9f2c5bee4cd8 kolla/ubuntu-source-neutron-metadata-agent:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) neutron_metadata_agent
f261ee8e08b8 kolla/ubuntu-source-neutron-l3-agent:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) neutron_l3_agent
52f2f14b69ea kolla/ubuntu-source-neutron-dhcp-agent:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) neutron_dhcp_agent
90aa8d550be5 kolla/ubuntu-source-neutron-openvswitch-agent:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) neutron_openvswitch_agent
98dbb3ed88e0 kolla/ubuntu-source-neutron-server:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) neutron_server
6e1055303292 kolla/ubuntu-source-openvswitch-vswitchd:master "dumb-init --single-…" 16 hours ago Up 16 hours openvswitch_vswitchd
5c8d431b6928 kolla/ubuntu-source-openvswitch-db-server:master "dumb-init --single-…" 16 hours ago Up 16 hours openvswitch_db
c84f4428c9a1 kolla/ubuntu-source-nova-novncproxy:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) nova_novncproxy
62dd34fe57f8 kolla/ubuntu-source-nova-conductor:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) nova_conductor
72b0aefdf986 kolla/ubuntu-source-nova-api:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) nova_api
ea06b3efab10 kolla/ubuntu-source-nova-scheduler:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) nova_scheduler
8ce685d32cf0 kolla/ubuntu-source-placement-api:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) placement_api
aeebb8887159 kolla/ubuntu-source-glance-api:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) glance_api
fe822dfeb19b kolla/ubuntu-source-keystone:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) keystone
7af8407ffb86 kolla/ubuntu-source-keystone-fernet:master "dumb-init --single-…" 16 hours ago Up 16 hours keystone_fernet
0c7f448911d3 kolla/ubuntu-source-keystone-ssh:master "dumb-init --single-…" 16 hours ago Up 16 hours (healthy) keystone_ssh
8847614a1c03 kolla/ubuntu-source-rabbitmq:master "dumb-init --single-…" 16 hours ago Up 16 hours rabbitmq
75bb2170f7b3 kolla/ubuntu-source-memcached:master "dumb-init --single-…" 16 hours ago Up 16 hours memcached
1176a6c088ba kolla/ubuntu-source-mariadb-clustercheck:master "dumb-init --single-…" 16 hours ago Up 16 hours mariadb_clustercheck
32b1ab2ee627 kolla/ubuntu-source-mariadb-server:master "dumb-init -- kolla_…" 16 hours ago Up 16 hours mariadb
94b5a08fb7d3 kolla/ubuntu-source-keepalived:master "dumb-init --single-…" 16 hours ago Up 16 hours keepalived
6a9268ac8b49 kolla/ubuntu-source-haproxy:master "dumb-init --single-…" 16 hours ago Up 16 hours haproxy
f278d62513e2 kolla/ubuntu-source-chrony:master "dumb-init --single-…" 16 hours ago Up 16 hours chrony
3e4945378daf kolla/ubuntu-source-cron:master "dumb-init --single-…" 16 hours ago Up 16 hours cron
da60d7dd6514 kolla/ubuntu-source-kolla-toolbox:master "dumb-init --single-…" 16 hours ago Up 16 hours kolla_toolbox
87bdb22f3f22 kolla/ubuntu-source-fluentd:master "dumb-init --single-…" 16 hours ago Up 16 hours fluentd
Using Openstack
root@yjwang0-stack-01:~# pip3 install python-openstackclient
Create openrc file
root@yjwang0-stack-01:~# cd kolla-ansible/tools/
root@yjwang0-stack-01:~/kolla-ansible/tools# ./kolla-ansible post-deploy
Check
root@yjwang0-stack-01:~/kolla-ansible/tools# openstack host list
+------------------+-----------+----------+
| Host Name | Service | Zone |
+------------------+-----------+----------+
| yjwang0-stack-01 | scheduler | internal |
| yjwang0-stack-03 | scheduler | internal |
| yjwang0-stack-02 | scheduler | internal |
| yjwang0-stack-01 | conductor | internal |
| yjwang0-stack-03 | conductor | internal |
| yjwang0-stack-02 | conductor | internal |
| yjwang0-stack-05 | compute | nova |
| yjwang0-stack-04 | compute | nova |
+------------------+-----------+----------+
Check and set env
root@yjwang0-stack-01:~/kolla-ansible/tools# . /etc/kolla/admin-openrc.sh
root@yjwang0-stack-01:~/kolla-ansible/tools# cat /etc/kolla/admin-openrc.sh
# Clear any old environment that may conflict.
for key in $( set | awk '{FS="="} /^OS_/ {print $1}' ); do unset $key ; done
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=D4sADozLQ5AuvhGBmzI7ZVbVI6DGu3FKzkwLLMwg
export OS_AUTH_URL=http://10.99.99.25:35357/v3
export OS_INTERFACE=internal
export OS_ENDPOINT_TYPE=internalURL
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=RegionOne
export OS_AUTH_PLUGIN=password
[option] create example networks, images, etc
root@yjwang0-stack-01:~/kolla-ansible/tools# ./init-runonce
[option] bash completion
root@yjwang0-stack-01:~/kolla-ansible/tools# openstack complete > /etc/bash_completion.d/osc
[재접속]
반응형