blob: 236ece9c01ece0e1b39a74a0943777bf61e62f50 [file] [log] [blame]
Dean Troyer26dd21b2014-11-06 09:33:02 -06001=========================
2All-In-One Single Machine
3=========================
Sean M. Collins09e550c2014-10-21 11:40:08 -04004
5Things are about to get real! Using OpenStack in containers or VMs is
6nice for kicking the tires, but doesn't compare to the feeling you get
7with hardware.
8
9Prerequisites Linux & Network
Sean Dague32930462014-11-18 06:51:16 -050010=============================
Sean M. Collins09e550c2014-10-21 11:40:08 -040011
12Minimal Install
Sean Dague32930462014-11-18 06:51:16 -050013---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040014
15You need to have a system with a fresh install of Linux. You can
16download the `Minimal
17CD <https://help.ubuntu.com/community/Installation/MinimalCD>`__ for
18Ubuntu releases since DevStack will download & install all the
19additional dependencies. The netinstall ISO is available for
Dean Troyerea3cdfa2014-11-08 08:29:16 -060020`Fedora <http://mirrors.kernel.org/fedora/releases/>`__
Sean M. Collins09e550c2014-10-21 11:40:08 -040021and
Dean Troyerea3cdfa2014-11-08 08:29:16 -060022`CentOS/RHEL <http://mirrors.kernel.org/centos/>`__.
Sean M. Collins09e550c2014-10-21 11:40:08 -040023You may be tempted to use a desktop distro on a laptop, it will probably
24work but you may need to tell Network Manager to keep its fingers off
25the interface(s) that OpenStack uses for bridging.
26
27Network Configuration
Sean Dague32930462014-11-18 06:51:16 -050028---------------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040029
30Determine the network configuration on the interface used to integrate
31your OpenStack cloud with your existing network. For example, if the IPs
32given out on your network by DHCP are 192.168.1.X - where X is between
33100 and 200 you will be able to use IPs 201-254 for **floating ips**.
34
35To make things easier later change your host to use a static IP instead
36of DHCP (i.e. 192.168.1.201).
37
38Installation shake and bake
Sean Dague32930462014-11-18 06:51:16 -050039===========================
Sean M. Collins09e550c2014-10-21 11:40:08 -040040
41Add your user
Sean Dague32930462014-11-18 06:51:16 -050042-------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040043
44We need to add a user to install DevStack. (if you created a user during
45install you can skip this step and just give the user sudo privileges
46below)
47
48::
49
50 adduser stack
51
52Since this user will be making many changes to your system, it will need
53to have sudo privileges:
54
55::
56
57 apt-get install sudo -y || yum install -y sudo
58 echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
59
60From here on you should use the user you created. **Logout** and
61**login** as that user.
62
63Download DevStack
Sean Dague32930462014-11-18 06:51:16 -050064-----------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040065
66We'll grab the latest version of DevStack via https:
67
68::
69
kieletha72a3932015-03-10 08:47:05 -070070 sudo apt-get install git -y || sudo yum install -y git
Sean M. Collins09e550c2014-10-21 11:40:08 -040071 git clone https://git.openstack.org/openstack-dev/devstack
72 cd devstack
73
74Run DevStack
Sean Dague32930462014-11-18 06:51:16 -050075------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040076
77Now to configure ``stack.sh``. DevStack includes a sample in
78``devstack/samples/local.conf``. Create ``local.conf`` as shown below to
79do the following:
80
81- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
82 192.168.1.224/27. This configures IP addresses ending in 225-254 to
83 be used as floating IPs.
84- Set ``FIXED_RANGE`` and ``FIXED_NETWORK_SIZE`` to configure the
85 internal address space used by the instances.
86- Set ``FLAT_INTERFACE`` to the Ethernet interface that connects the
87 host to your local network. This is the interface that should be
88 configured with the static IP address mentioned above.
89- Set the administrative password. This password is used for the
90 **admin** and **demo** accounts set up as OpenStack users.
91- Set the MySQL administrative password. The default here is a random
92 hex string which is inconvenient if you need to look at the database
93 directly for anything.
94- Set the RabbitMQ password.
95- Set the service password. This is used by the OpenStack services
96 (Nova, Glance, etc) to authenticate with Keystone.
97
98``local.conf`` should look something like this:
99
100::
101
102 [[local|localrc]]
103 FLOATING_RANGE=192.168.1.224/27
104 FIXED_RANGE=10.11.12.0/24
105 FIXED_NETWORK_SIZE=256
106 FLAT_INTERFACE=eth0
107 ADMIN_PASSWORD=supersecret
108 MYSQL_PASSWORD=iheartdatabases
109 RABBIT_PASSWORD=flopsymopsy
110 SERVICE_PASSWORD=iheartksl
Davanum Srinivas005b1db2015-02-04 10:53:31 -0500111 SERVICE_TOKEN=xyzpdqlazydog
Sean M. Collins09e550c2014-10-21 11:40:08 -0400112
113Run DevStack:
114
115::
116
117 ./stack.sh
118
119A seemingly endless stream of activity ensues. When complete you will
120see a summary of ``stack.sh``'s work, including the relevant URLs,
121accounts and passwords to poke at your shiny new OpenStack.
122
123Using OpenStack
Sean Dague32930462014-11-18 06:51:16 -0500124---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400125
126At this point you should be able to access the dashboard from other
127computers on the local network. In this example that would be
128http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
129you give them floating IPs and security group access those VMs will be
130accessible from other machines on your network.
131
132Some examples of using the OpenStack command-line clients ``nova`` and
133``glance`` are in the shakedown scripts in ``devstack/exercises``.
134``exercise.sh`` will run all of those scripts and report on the results.