| Key | Value | | ----- | --- | | Interfaces | 2 interface, enp1s0 : 10.20.21.0/24, enp7s0 : isolated network | | Ram | 8GB | | vCPUs| 2 | | Storage| 2 Disk, 1 Disk Sistem (30-40GB), 1 Cinder volume(50GB) | | Operating System | Ubuntu 18.04 |
```bash $ docker version ```
```bash # check all disk $ sudo fdisk -l # LVM $ sudo pvcreate -f /dev/vdx $ sudo pvs $ sudo vgcreate -f openstack_cinder /dev/vdx $ sudo vgs ```
```bash $ sudo apt-get update $ sudo apt-get upgrade ```
```bash # Install package $ sudo apt install python3-dev python3-venv libffi-dev gcc libssl-dev git # Create virtual environment ('openstack-ussuri' bebas untuk dirubah) $ python3 -m venv $HOME/openstack-ussuri $ source $HOME/openstack-ussuri/bin/activate # Akan menjadi seperti berikut (openstack-ussuri) sulaiman@al-faruq:~$ # Upgrade PIP (openstack-ussuri) sulaiman@al-faruq:~$ pip install -U pip ```
Install ansible and Kolla-ansible
```bash # install ansible (openstack-ussuri) sulaiman@al-faruq:~$ pip install ansible # ansible config (openstack-ussuri) sulaiman@al-faruq:~$ vim $HOME/ansible.cfg ... [defaults] host_key_checking=False pipelining=True forks=100 ... # install kolla-ansible (openstack-ussuri) sulaiman@al-faruq:~$ pip install kolla-ansible (openstack-ussuri) sulaiman@al-faruq:~$ sudo mkdir /etc/kolla (openstack-ussuri) sulaiman@al-faruq:~$ sudo chown $USER:$USER /etc/kolla (openstack-ussuri) sulaiman@al-faruq:~$ cp $HOME/openstack-ussuri/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/ (openstack-ussuri) sulaiman@al-faruq:~$ cp $HOME/openstack-ussuri/share/kolla-ansible/ansible/inventory/all-in-one . (openstack-ussuri) sulaiman@al-faruq:~$ vim /etc/kolla/globals.yml ... kolla_base_distro: "ubuntu" kolla_install_type: "source" openstack_release: "ussuri" kolla_internal_vip_address: "10.20.21.200" kolla_external_vip_address: "{{ kolla_internal_vip_address }}" network_interface: "enp1s0" neutron_external_interface: "enp7s0" neutron_plugin_agent: "openvswitch" enable_haproxy: "yes" enable_cinder: "yes" enable_cinder_backend_lvm: "yes" keystone_token_provider: 'fernet' cinder_volume_group: "openstack_cinder" nova_compute_virt_type: "qemu" ... ```
```bash # generate password (openstack-ussuri) sulaiman@al-faruq:~$ kolla-genpwd (openstack-ussuri) sulaiman@al-faruq:~$ kolla-ansible -i all-in-one bootstrap-servers (openstack-ussuri) sulaiman@al-faruq:~$ kolla-ansible -i all-in-one prechecks (openstack-ussuri) sulaiman@al-faruq:~$ kolla-ansible -i all-in-one deploy ```
```bash (openstack-ussuri) sulaiman@al-faruq:~$ pip install python-openstackclient python-neutronclient python-glanceclient (openstack-ussuri) sulaiman@al-faruq:~$ kolla-ansible post-deploy (openstack-ussuri) sulaiman@al-faruq:~$ source /etc/kolla/admin-openrc.sh (openstack-ussuri) sulaiman@al-faruq:~$ vim openstack-ussuri/share/kolla-ansible/init-runonce ... ENABLE_EXT_NET=${ENABLE_EXT_NET:-1} EXT_NET_CIDR=${EXT_NET_CIDR:-'10.20.21.0/24'} EXT_NET_RANGE=${EXT_NET_RANGE:-'start=10.20.21.150,end=10.20.21.199'} EXT_NET_GATEWAY=${EXT_NET_GATEWAY:-'10.20.21.1'} ... (openstack-ussuri) sulaiman@al-faruq:~$ openstack-ussuri/share/kolla-ansible/init-runonce # hasilnya seperti berikut ... +----------------------------+-----------+ | Field | Value | +----------------------------+-----------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 160 | | id | 5 | | name | m1.xlarge | | os-flavor-access:is_public | True | | properties | | | ram | 16384 | | rxtx_factor | 1.0 | | swap | | | vcpus | 8 | +----------------------------+-----------+ Done. To deploy a demo instance, run: openstack server create \ --image cirros \ --flavor m1.tiny \ --key-name mykey \ --network demo-net \ demo1 ```
```bash # check openstack service (openstack-ussuri) sulaiman@al-faruq:~$ openstack service list +----------------------------------+-------------+----------------+ | ID | Name | Type | +----------------------------------+-------------+----------------+ | 04e41f72c008488182bff61e2601d1e6 | keystone | identity | | 2af3f2f410ff4fdcb4f210cf129a9ca7 | neutron | network | | 557ad1c41ca444e0b31d5d9b9057a878 | nova | compute | | 7a25f64412194916898f9226dd49c243 | heat-cfn | cloudformation | | 7c0d1b1fd3a3488d9816f642058882a5 | nova_legacy | compute_legacy | | 818f1176de7e47059ab9d3d66db112d9 | heat | orchestration | | a649b28bb0d54593868953c2450468fe | placement | placement | | a8f3d6bac282490e9562738b8b2f7522 | glance | image | | cca52c5f7c6d4677afd6bd182001fcab | cinderv3 | volumev3 | | faeebb8439be4b328ecc0b812224fdc4 | cinderv2 | volumev2 | +----------------------------------+-------------+----------------+ # check password login horizon (openstack-ussuri) sulaiman@al-faruq:~$ grep keystone_admin_password /etc/kolla/passwords.yml ```
- Akses dashboard openstack dengan ip address VIP (10.20.21.200) pada web browser