Difference between revisions of "DevStack: Install OpenStack"

From OnnoWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Persiapan VM==
 
==Persiapan VM==
  
Siapkan VM di VirtualBox
+
Siapkan VM di VirtualBox (Mungkin yang aman Ubuntu 16.04)
  
 
* Memory 4GB
 
* Memory 4GB
Line 10: Line 10:
 
'''WARNING:''' DevStack akan mengubah sistem habis-habisan saat instalasi. Jalankan DevStack pada server / mesin virtual yang di dedikasikan untuk keperluan tersebut.
 
'''WARNING:''' DevStack akan mengubah sistem habis-habisan saat instalasi. Jalankan DevStack pada server / mesin virtual yang di dedikasikan untuk keperluan tersebut.
  
 
+
==Siapkan Repo & User==
==Siapkan User==
 
  
 
SSH ke VM.
 
SSH ke VM.
  
Buat user stack (sudoer) untuk menjalankan DevStack,
 
  
sudo useradd -s /bin/bash -d /opt/stack -m stack
+
Edit /etc/apt/sources.list, tambahkan universe dan multiverse
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
 
  
Pindah user
+
deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse
 
+
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse
  sudo su - stack
+
  deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse
  
==Download==
+
Untuk 18.04
  
Download
+
deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse
 +
deb http://archive.ubuntu.com/ubuntu bionic-security main universe multiverse
 +
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe multiverse
  
git clone https://github.com/openstack-dev/devstack.git -b stable/pike devstack/
+
Save dan update
  
You should see:
+
apt update
  
Cloning into 'devstack'...
 
  
Notes
+
Buat user stack (sudoer) untuk menjalankan DevStack,
  
The above command downloads OpenStack release Pike. You can also check the list of available releases. To download releases in EOL status (End Of Life) replace -b stable/pike
+
  sudo useradd -s /bin/bash -d /opt/stack -m stack
 +
  echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
  
with, for example, -b liberty-eol (for Liberty).
+
Pindah user
  
Step 7.
+
sudo su - stack
  
Change to the devstack directory:
+
==Download & Setup==
  
cd devstack/
+
Download
 
 
Step 8:
 
 
 
Determine your IP address:
 
 
 
sudo ifconfig
 
 
 
You will see a response something like this:
 
 
 
enp0s3 Link encap:Ethernet  HWaddr 08:00:27:ea:97:9f 
 
      inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
 
      inet6 addr: fe80::d715:6025:f469:6f7c/64 Scope:Link
 
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
      RX packets:1364291 errors:0 dropped:0 overruns:0 frame:0
 
      TX packets:406550 errors:0 dropped:0 overruns:0 carrier:0
 
      collisions:0 txqueuelen:1000
 
      RX bytes:1415725472 (1.4 GB)  TX bytes:27942474 (27.9 MB)
 
 
 
lo    Link encap:Local Loopback 
 
      inet addr:127.0.0.1  Mask:255.0.0.0
 
      inet6 addr: ::1/128 Scope:Host
 
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
 
      RX packets:229208 errors:0 dropped:0 overruns:0 frame:0
 
      TX packets:229208 errors:0 dropped:0 overruns:0 carrier:0
 
      collisions:0 txqueuelen:1000
 
      RX bytes:89805124 (89.8 MB)  TX bytes:89805124 (89.8 MB)
 
 
 
You’re looking for the addr: value in an interface other than lo.  For example, in this case, it’s 10.0.2.15.  Make note of that for the next step. If you run your VM on the cloud, make sure to use the public IP of your VM in the link.
 
 
 
Step 9.
 
 
 
Create the local.conf file with 4 passwords and your host IP, which you determined in the last step:
 
 
 
cat >  local.conf <<EOF
 
[[local|localrc]]
 
ADMIN_PASSWORD=secret
 
DATABASE_PASSWORD=\$ADMIN_PASSWORD
 
RABBIT_PASSWORD=\$ADMIN_PASSWORD
 
SERVICE_PASSWORD=\$ADMIN_PASSWORD
 
HOST_IP=10.0.2.15
 
RECLONE=yes
 
EOF
 
 
 
This is the minimum required config to get started with DevStack.
 
 
 
Step 10.
 
 
 
Now install and run OpenStack:
 
  
./stack.sh
+
git clone https://git.openstack.org/openstack-dev/devstack
  
At the end of the process you should see output something like this:
+
Edit
  
This is your host IP address: 10.0.2.15
+
cd devstack/
This is your host IPv6 address: ::1
+
vi local.conf
Horizon is now available at http://10.0.2.15/dashboard
 
Keystone is serving at http://10.0.2.15/identity/
 
The default users are: admin and demo
 
The password: secret
 
DevStack Version: pike
 
OS Version: Ubuntu 16.04 xenial
 
stack.sh completed in 1221 seconds.
 
  
This will take a 15 – 20 minutes, largely depending on the speed of your internet connection. Many git trees and packages will be installed during this process.
+
[[local|localrc]]
 +
ADMIN_PASSWORD=secret
 +
DATABASE_PASSWORD=$ADMIN_PASSWORD
 +
RABBIT_PASSWORD=$ADMIN_PASSWORD
 +
SERVICE_PASSWORD=$ADMIN_PASSWORD
  
Step 11.
+
==Instalasi==
  
Access your OpenStack by copy-pasting the link from the above output into your web browser:
+
Jalankan (mungkin perlu beberapa kali menjalankan ini)
  
http://<HOST_IP>/dashboard
+
./stack.sh
  
Use the default users demo or admin and configured password from step 8 (secret).
+
Contoh Hasil Akhirnya
  
You should see the following log-in window in your browser:
+
This is your host IP address: 192.168.0.107
 +
This is your host IPv6 address: fe80::a00:27ff:fe7d:33c6
 +
Horizon is now available at http://192.168.0.107/dashboard
 +
Keystone is serving at http://192.168.0.107/identity/
 +
The default users are: admin and demo
 +
DevStack Version: train
 +
Change: 0cb721b790baa8f2929f716dc8945f4bfd25f08f Merge "Fix is_neutron_legacy_enabled function"  2019-05-04 22:38:45 +0000
 +
OS Version: Ubuntu 16.04 xenial
 +
2019-05-10 02:03:55.964 | stack.sh completed in 1312 seconds.
  
openstack_devstack_login
+
Atau di 18.04
  
From here, you can do whatever you need to, either from the Horizon interface, or by downloading credentials to use the command line.
 
  
You can find out how to do some of the more common tasks by viewing the original webinar, or check out our OpenStack Training resources.
+
This is your host IP address: 192.168.0.3
 +
This is your host IPv6 address: fe80::a00:27ff:fe33:525
 +
Horizon is now available at http://192.168.0.3/dashboard
 +
Keystone is serving at http://192.168.0.3/identity/
 +
The default users are: admin and demo
 +
The password: secret
 +
DevStack Version: train
 +
OS Version: Ubuntu 18.04 bionic
 +
2019-05-07 03:57:31.386 | stack.sh completed in 3869 seconds.
  
 +
Waktu instalasi tergantung akses Internet yang kita miliki.
  
 +
==Akses Dashboard==
  
 +
URL
  
 +
http://<HOST_IP>/dashboard
  
 +
User      demo atau admin
 +
password  sesuai local.conf
  
 
==Referensi==
 
==Referensi==
  
 
* https://www.mirantis.com/blog/how-to-install-openstack-on-your-local-machine-using-devstack/
 
* https://www.mirantis.com/blog/how-to-install-openstack-on-your-local-machine-using-devstack/

Latest revision as of 09:05, 10 May 2019

Persiapan VM

Siapkan VM di VirtualBox (Mungkin yang aman Ubuntu 16.04)

  • Memory 4GB
  • Akses ke Internet
  • Terbuka port 22 dan 80 untuk di akses dari laptop.
  • Ubuntu Server kosong dapat digunakan.

WARNING: DevStack akan mengubah sistem habis-habisan saat instalasi. Jalankan DevStack pada server / mesin virtual yang di dedikasikan untuk keperluan tersebut.

Siapkan Repo & User

SSH ke VM.


Edit /etc/apt/sources.list, tambahkan universe dan multiverse

deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse

Untuk 18.04

deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe multiverse

Save dan update

apt update


Buat user stack (sudoer) untuk menjalankan DevStack,

sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

Pindah user

sudo su - stack

Download & Setup

Download

git clone https://git.openstack.org/openstack-dev/devstack

Edit

cd devstack/
vi local.conf
localrc
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

Instalasi

Jalankan (mungkin perlu beberapa kali menjalankan ini)

./stack.sh

Contoh Hasil Akhirnya

This is your host IP address: 192.168.0.107
This is your host IPv6 address: fe80::a00:27ff:fe7d:33c6
Horizon is now available at http://192.168.0.107/dashboard
Keystone is serving at http://192.168.0.107/identity/
The default users are: admin and demo
DevStack Version: train
Change: 0cb721b790baa8f2929f716dc8945f4bfd25f08f Merge "Fix is_neutron_legacy_enabled function"  2019-05-04 22:38:45 +0000
OS Version: Ubuntu 16.04 xenial
2019-05-10 02:03:55.964 | stack.sh completed in 1312 seconds.

Atau di 18.04


This is your host IP address: 192.168.0.3
This is your host IPv6 address: fe80::a00:27ff:fe33:525
Horizon is now available at http://192.168.0.3/dashboard
Keystone is serving at http://192.168.0.3/identity/
The default users are: admin and demo
The password: secret
DevStack Version: train
OS Version: Ubuntu 18.04 bionic
2019-05-07 03:57:31.386 | stack.sh completed in 3869 seconds.

Waktu instalasi tergantung akses Internet yang kita miliki.

Akses Dashboard

URL

http://<HOST_IP>/dashboard
User      demo atau admin
password  sesuai local.conf

Referensi