+ All Categories
Home > Technology > Devstack lab guide

Devstack lab guide

Date post: 07-Aug-2015
Category:
Upload: openstackcisco
View: 250 times
Download: 1 times
Share this document with a friend
Popular Tags:
41
DevStack HandsOn Installation and Lab Guide Presenters: Anne McCormick – [email protected] Cisco Live! San Diego 2015
Transcript

DevStack  Hands-­‐On  Installation  and  Lab  Guide  

                                                 

Presenters:  Anne  McCormick  –  [email protected]  

   Cisco  Live!  San  Diego  2015  

   

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   2  

       

Table  of  Contents  

Lab  Information  ....................................................................................................................................  3  Ubuntu  14.04.2  Desktop  VM  .......................................................................................................................  3  DevStack  Horizon  ...........................................................................................................................................  3  

Lab  Topology  .........................................................................................................................................  4  

VMware  Setup  .......................................................................................................................................  5  

VirtualBox  Setup  ..................................................................................................................................  7  Overall  Objectives  ................................................................................................................................  9  

Task  1  –  Bring  up  Ubuntu  VM  .........................................................................................................  10  

Task  2  –  Install  DevStack  from  stable  Kilo  branch  .................................................................  12  Task  3  –  Bring  up  DevStack  Horizon  ............................................................................................  13  

Task  4  –  Configure  demo  tenant  network  ..................................................................................  15  Task  5  –  Configure  demo  tenant  router  ......................................................................................  20  

Task  6  –  Configure  demo  tenant  instance  ..................................................................................  26  

Task  7  –  Add  access  rules  to  allow  ping/ssh  to  instance  ......................................................  31  Task  7  –  Add  floating  IP  for  instance  ...........................................................................................  36  

Task  9  –  Much  fanfare  and  hoopla  ................................................................................................  41        

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   3  

Lab  Information    

Ubuntu  14.04.2  Desktop  VM  Username:  demo  Password:  demo    

DevStack  Horizon  Access  the  web  server  using  a  web  browser  on  Ubuntu  VM:  http://localhost    Username:  admin  Password:  openstack    Username:  demo  Password:  openstack      

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   4  

Lab  Topology          

 

     

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   5  

VMware  Setup    These  instructions  are  based  on  VMware  Fusion  7.1.1  Pro,  but  should  apply  to  other  versions  of  VMware  Fusion  (Mac)  and  VMware  Workstation  (PC).    

VMware  configuration  and  enablement    

If  you  haven’t  already  done  so,  download  and  install  VMware  Fusion.  By  default  VMware  will  configure  two  networks:    

1. Shared  with  my  Mac  (or  PC)  (Effectively  NAT  Overload  on  the  laptop  IP)      2. Private  to  my  Mac  (Internal  L2  segment  with  no  default  routing  capabilities).    There  

is  only  a  need  to  have  a  single  interface,  specifically  the  “Shared  with  my  Mac”  {or  on  a  PC}  NAT  network,  this  being  the  default  NAT  network      

It  is  necessary  to  ensure  that  the  Shared  with  my  Mac  adapter  has  the  same  address  as  the  VM  being  deployed  in  order  for  the  VM  to  function  properly.  

To  change  the  address  on  a  Mac,  pull  up  a  terminal  window  and  edit  the  VMware  Fusion  network  definition  file:  

sudo  nano  /Library/Preferences/VMware\  Fusion/networking      

The  file  should  have  a  set  of  VNET_8  clauses  that  looks  like  (there  may  be  more  config  lines  as  well,  but  these  are  the  critical  ones):                          

• answer  VNET_8_DHCP  yes  • answer  VNET_8_HOSTONLY_NETMASK  255.255.255.0  • answer  VNET_8_HOSTONLY_SUBNET  192.168.56.0  • answer  VNET_8_VIRTUAL_ADAPTER  yes  • answer  VNET_8_NAT  yes  

 

To  change  the  address  on  a  PC,  changing  the  network  address  for  the  “NAT”  interface  can  be  done  via  the  User  Interface:    

 

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   6  

 

 

   

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   7  

VirtualBox  Setup    If  you  do  not  have  VirtualBox  installed,  the  software  components  have  been  provided  for  your  convenience  in  the  VirtualBox  Installation  directory.  Note  that  in  addition  to  the  installer  itself  (.exe,  .dmg,  .rpm  or  .deb),  there  is  an  extension  pack  that  should  be  installed  after  the  base  VirtualBox  platform  is  installed,  but  prior  to  starting  any  virtual  machines.  Additional  information  is  available  at:  http://virtualbox.org.  

Virtualbox  configuration  and  enablement  

If  you  haven’t  already,  leverage  the  appropriate  installer  on  the  USB  stick,  and  install  Virtual  Box,  followed  by  the  Virtual  Box  extension  pack.  

For  this  system,  you  will  need  to  associate  2  networks  with  your  imported  OVA  (the  next  step  is  to  import  the  OVA):  

Adapter  1:  HostOnly  network  with  or  with  DHCP  with  a  base  address  space  of  192.168.56.0/24,  and  if  DHCP  is  enabled  the  range  should  start  above  20  (e.g.  192.168.56.20-­‐192.168.56.100).  

Adapter  2:  NAT  network,  this  being  the  default  NAT  network  

If  you  don’t  have  host  only  networks  defined,  or  the  networks  you  have  do  not  match  the  addresses  listed  above,  you  can  create  new  networks  from  the  systems  level  preferences.  

On  a  Mac,  you  should  see  screen  shots  like  this:    

   

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   8  

And  for  the  vboxnet0  adapter  settings  similar  to:    

 On  a  PC,  you  should  see  screen  shots  like:    

     And  for  vboxnet0  adapter  settings  similar  to:    

     

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   9  

Overall  Objectives    The  lab  will  be  segmented  into  logical  tasks,  each  having  several  steps  to  be  completed  to  help  you  become  familiar  with  DevStack  installation  and  usage.    

1. Task  1  –  Bring  up  Ubuntu  VM  2. Task  2  –  Install  DevStack  from  stable  Kilo  branch  3. Task  3  –  Bring  up  DevStack  Horizon  4. Task  4  –  Configure  demo  tenant  network  5. Task  5  –  Configure  demo  tenant  router  6. Task  6  –  Configure  demo  tenant  instance  7. Task  7  –  Add  access  rules  to  allow  ping/ssh  to  instance  8. Task  8  –  Add  floating  IP  to  instance  9. Task  8  –  Much  fanfare  and  hoopla  

   

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   10  

Task  1  –  Bring  up  Ubuntu  VM    Prerequisite:  Have  either  VirtualBox  or  VMware  Fusion  installed  on  laptop    

1. On  the  USB  stick,  locate  the  Ubuntu  14.04.2  image  for  either  VirtualBox  or  VMware  Fusion,  depending  on  your  configuration:  

 USB  -­‐>  CiscoLive  -­‐>  Ubuntu-­‐14.04  -­‐>  [VMware  or  VirtualBox]    

2. Import  the  Ubuntu  OVA  file  into  Fusion  or  VirtualBox    

     

3. Start  the  Ubuntu  VM        

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   11  

4. Log  in  as  demo  user  (password:  demo)    

     

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   12  

Task  2  –  Install  DevStack  from  stable  Kilo  branch    

1. Bring  up  Terminal  window  in  Ubuntu  VM    

2. cd  /home/demo/CiscoLive    

3. edit  (vi  or  emacs)  localrc,  comment  out  this  line:      

#  Logging  LOGFILE=$DEST/logs/stack.sh.log  VERBOSE=True  #OFFLINE=True                                              ßadd  #  in  front  of  this  line  LOG_COLOR=False  SCREEN_LOGDIR=$DEST/logs/screen    

4. cd  /home/demo    

5. git  clone  –b  stable/kilo  https://github.com/openstack-­‐dev/devstack.git    

6. cp  /home/demo/CiscoLive/localrc  /home/demo/devstack    

7. cd  /home/demo/devstack    

8. ./stack.sh    

9. Get  a  cup  of  coffee,  make  a  few  phone  calls  ….        

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   13  

Task  3  –  Bring  up  DevStack  Horizon    

1. Bring  up  Firefox  on  Ubuntu  VM    

2. Go  to  DevStack  Horizon:    http://localhost    

Username:    admin  Password:  openstack    Username:  demo  Password:  openstack  

   

         

 

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   14  

3. Play  around  with  Horizon  for  a  bit  as  admin  user      

                       

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   15  

Task  4  –  Configure  demo  tenant  network    

1. Log  in  to  Horizon  as  demo  user  (password:  openstack)    

2. Bring  up  “Network  Topolgy”  UI    

   

3. Select  “+Create  Network”    

4. Create  “testnet”    

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   16  

 5. Select  “Next”  and  configure  test-­‐subnet  as  follows:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   17  

   

6. Select  “Next”  and  configure  subnet  details  as  follows:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   18  

 7. Select  “Create”  and  voila!  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   19  

           

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   20  

Task  5  –  Configure  demo  tenant  router    

1. From  “Network  Topology”  UI,  select  “+Create  Router”  and  create  test-­‐router,  attach  to  public  network:  

   

2. Select  “Create  Router”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   21  

   

3. Hoover  over  the  router  in  “Network  Topology”,  click  on  “View  Router  Details”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   22  

 4. Select  “Interfaces”  tab  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   23  

   

5. Select  “+Add  Interface”    

6. From  Subnet  pulldown,  select  “testnet”  subnet    

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   24  

   

7. Select  “Add  Interface”    

8. From  “Network  Topology”,  the  router  should  be  attached  to  both  the  public  network  and  testnet  

 

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   25  

       

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   26  

Task  6  –  Configure  demo  tenant  instance    

1. From  “Network  Topology”  UI,  select  “Launch  Instance”  

     

2. From  Ubuntu  Terminal  window,  run  ‘ssh-­‐keygen  –t  rsa  –f  cloud.key’  in  /home/demo/.ssh  (empty  passphrase  is  fine  for  now):  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   27  

     

3. Copy  contents  of  cloud.key.pub  to  clipboard    

4. From  Horizon,  click  on  “Access  &  Security”  tab,  click  “+”  to  add  a  keypair,  create  keypair  “test-­‐keypair”  and  copy  public  key  contents:  

 

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   28  

 5. Select  “Import  Key  Pair”  

 6. From  “Launch  Instance”  UI,  select  “Networking”  tab  

 7. Make  sure  testnet  is  in  selected  networks  list:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   29  

     

8. Select  “Launch”    

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   30  

         

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   31  

Task  7  –  Add  access  rules  to  allow  ping/ssh  to  instance    

1. Bring  up  “Compute  -­‐>  Access  &  Security”  UI  

 2. For  default  security  group,  select  “Manage  Rules”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   32  

   

3. Select  “+Add  Rule”    

4. Add  an  ingress  “All  ICMP”  rule  as  follows:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   33  

   

5. Add  an  egress  “All  ICMP”  rule,  also    

6. Finally,  add  a  rule  to  allow  ssh  to  the  instance:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   34  

 7. Your  rules  now  should  look  like  this:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   35  

     

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   36  

Task  7  –  Add  floating  IP  for  instance    

1. From  “Compute  -­‐>  Instances”  UI,  under  “test-­‐instance”  select  “Associate  Floating  IP”  

   

2. From  “Manage  Floating  IP  Associations”  UI,  select  “+”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   37  

   

3. From  “Allocate  Floating  IP”  UI,  select  “Allocate  IP”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   38  

 4. Select  “Associate”  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   39  

   

5. From  “Instances”  UI,  you’ll  now  see  local  IP  and  floating  IP  for  the  instance  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   40  

     

6. Try  to  ping  and  ssh  to  your  instance:  

CiscoLive  2015   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   41  

     

Task  9  –  Much  fanfare  and  hoopla                      

 


Recommended