Running OpenStack + MidoNet (Using Orizuru)

40
Running OpenStack + MidoNet Virtual Tecch Japan VitrualTech.jp Nobuyuki Tamaoki 2015/2/16 MidoNet Community Launch Event

Transcript of Running OpenStack + MidoNet (Using Orizuru)

Running OpenStack + MidoNet

Virtual Tecch Japan

VitrualTech.jp

Nobuyuki Tamaoki

2015/2/16 MidoNet Community Launch Event

About me• Consultant & Business

development @Virtual Tech Japan

• Enjoy creating business around

OpenStack

• Writer of @IT article named

“Tamaoki’s OpenStack Watch”

• Latest article at ThinkIT, “8

OpenStack distribution

comparison” will be coming very

soon

2

Introduction

OpenStack Seminar

February 18th in Shibuya

“OpenStack Provisioning Tool Battle

- HP Helion、Mirantis、Ubuntu –”

Please visit!! http://EnterpriseCloud.jp

3

Introduction

EnterpriseCloud.jp

• You can find:

– The information necessary to

start OpenStack for Enterprise

Cloud.

– Download OpenStack installation

guide

– 1,000 Download /year

– Seminar documents

– OpenStack deployment know-

how

4

Introduction

Today’s goal

• To let everyone deploy and run

OpenStack+MidoNet in smooth and simple

way

5

ABOUT ORIZURU

6

Found Orizuru at MidoNet Blog

7Reference URL: http://blog.midonet.org/test-drive-midonet/

What is Orizuru?

• Installer for OpenStack+MidoNet

• Enable to deploy all-in-one and multi-node

environments easily.

• Docker container is used inside.

https://github.com/midonet/orizuru

8

Multi-node environment example

9Reference URL: http://blog.midonet.org/test-drive-midonet/

LET’S USE ORIZURU

10

Preaparation

11

• Macbook Pro

– CPU:4 processor core

– Memory:16GB

• VMware Fusion

• Guest OS

– Ubuntu 14.04.1

– CPU: 4 processor core

– Memory: 12GB allocated

– Disk: 40GB allocated

192.168.252.14

midonet_manager

192.168.252.13

midonet_gateway

Let’s create all-in-one environment

12

midonet_api192.168.252.11

Cassandra192.168.252.10

midonet_cli192.168.252.12

192.168.252.15

openstack_compute

192.168.252.16

Openstack_controller

192.168.252.17

openstack_glance192.168.252.18

openstack_horizon192.168.252.19

openstack_keystone

192.168.252.20

openstack_mysql

192.168.252.21

openstack_neutron

192.168.252.22

openstack_rabbitmq

zookeeper192.168.252.23

Physical server172.16.XX.XX

OpenStack

Compute Nodes

OpenStack

Network Nodes

OpenStack

Controller Nodes

MidoNet

Gateway Nodes

MidoNet

Controller Nodes 192.168.252.14

midonet_manager

192.168.252.13

midonet_gatewayNetwork State

Database Nodes

Components of the environment

13

midonet_api192.168.252.11

Cassandra192.168.252.10

midonet_cli192.168.252.12

192.168.252.15

openstack_compute

192.168.252.16

Openstack_controller

192.168.252.17

openstack_glance192.168.252.18

openstack_horizon192.168.252.19

openstack_keystone

192.168.252.20

openstack_mysql

192.168.252.21

openstack_neutron

192.168.252.22

openstack_rabbitmq

zookeeper192.168.252.23

Physical Server172.16.XX.XX

INTALL ORIZURU

14

1. Install Ubuntu

• Install Ubuntu 14.04.1 LTS

– Choose ssh-server

• Update packages

% sudo apt-get update

% sudo apt-get upgrade

• Install packages

% sudo apt-get install git make openssh-server

15

2. Configuration to ssh login to

localhost as a root user

16

• Make sure that you can ssh root@localhost

% ssh-keygen -t rsa

% sudo su -

# mkdir .ssh

# cat /home/ubuntu/.ssh/id_rsa.pub >>

~/.ssh/authorized_keys

# chmod 600 .ssh/authorized_keys

% ssh root@localhost

3. Get Orizuru from GitHub

% git clone https://github.com/midonet/orizuru.git

17

4. Modify conf/localhost.yaml

• Modify the server IP address from the

default (127.0.0.1) to your server’s IP

address

% cd orizuru

% vi conf/localhost.yaml

18

After

servers:

os001:

ip: your server’s IP address

Before (default)

servers:

os001:

ip: 127.0.0.1

5. Run Orizuru

• Execute “make” command

% cd

% cd orizuru

% export OS_MIDOKURA_ROOT_PASSWORD=”PW"

% export CONFIGFILE="$(pwd)/conf/localhost.yaml"

% make

19

Set your own

password

6. See the result

• The installation succeeded if you see the

message below.

your system is ready.

run 'make info' to see the urls and admin password

• If not, do “make clean” and re-do “make”.

% make clean

% make

20

The errors happened during the

installationI tried the installation more than 20 times.

Here are the examples of errors I run into:

• Cannot log in when I ssh root@localhost

• Disc capacity was not big enough

• Could not find files and/or directories in

stage5

• Failed mysql setting in stage6

• Failed zookeeper setting in stage7

• etc 21

Trouble shooting

22

• Enable debug mode in conf/localhost.yaml

debug: True

• Save the log when you run “make” command

• Wait for a while and try again

• Try in multiple environments

Ask questions at MidoNet mailing list!

[email protected]

7. Check the configuration

• To check the setting, do “make info”

command% make info

Admin password: XXXXXXXXXXXXXXXX

Horizon url: http://”server’s IP address”/horizon/

• Save the result of “make info”.

23

Example of “make info” result

(1)

24

XXX.XXX.XXX.XX

Example of “make info” result

(2)

25

CONFIRM THE TESTING

ENVIRONMENT

26

Access OpenStack

Dashboard(Horizon)

• Access Horizon URL (see page 23 for the

URL)

27

User name:

“admin”Admin password

(See page23)

Access OpenStack

Dashboard(Horizon)

28

Check instances (1)

• Click [Project]-[Compute]-[Instance]

29

Check your

instance IP address

Check instances (2)

• Log in to the instance

% ssh [email protected]

[email protected]'s password:

30

Input cubswin:)

Admin password

in page 23

Check OpenStack Controller (1)

• Log-in to OpenStack Controller node% ssh [email protected]

• Create admin_openrcroot@openstack_controller_os001:~# vi admin_openrc

export OS_USERNAME=admin

export OS_PASSWORD=9572b2b1a67d4aa2ff0c

export OS_TENANT_NAME=admin

export OS_AUTH_URL=http://192.168.252.19:35357/v2.0

31

How to find OS_AUTH_URL

• OS_AUTH_URL will be used when you

access keystone node

• http://[keystone URL]:[keystone port

#]/v2.0

• Search the log from “make” command(page

19)の make

% cat make_log | grep OS_AUTH_URL

• Test

% curl http://192.168.252.19:35357/v2.032

Check OpenStack Controller (2)

• Load admin_openrc

root@openstack_controller_os001:~# . admin_openrc

33

Tips: Check the log of Orizuru

environment• Show syslog in

% tail –f /var/log/syslog

34

Tips: Check the server status

% dstat -tcdn --top-io --top-cpu -- output log.csv

35

Check OpenStack Controller (3)

root@openstack_controller_os001:~# keystone token-get

36

Check OpenStack Controller (4)

root@openstack_controller_os001:~# neutron agent-list

root@openstack_controller_os001:~# neutron net-list

root@openstack_controller_os001:~# neutron subnet-list

37

Check MidoNet CLI (1)

• Log in to MidoNet CLI node

% ssh [email protected]

• MidoNet CLI command

root@midonet_cli_os001:~# midonet-cli

midonet>

38

Check MidoNet CLI (2)

midonet> list bridge

midonet> list router

midonet> list router router0 port

midonet> list router router0 route

39

My next agenda

• Learn MidoNet trouble-shooting

• Practice and master MidoNet CLI

• Run MidoNet in multi-node environment

40