Skip to content

arunkhan/openstack-sandiego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

openstack-sandiego

OpenStack San Diego Meetup

In this tutorial, you'll be starting up a number of web servers to run your new ecommerce startup. These virtual servers will be running in an OpenStack cloud that has all the computing, storage and networking resources you need.

Before you start, you'll neeed an account login and password from the person in charge of this lab.

For those of you in the lab, add yourself to this list to take an account: https://etherpad.openstack.org/p/san-diego

  • Get a username and password for the OpenStack cloud

We'll be using the CityCloud OpenStack cloud at https://citycontrolpanel.com

We're going to need a network to run our web servers. Let's us a private IP address range of 10.10.10.0/24 that we will call web-net.

  • Click "Network"->"Networks"->"Create Network"
  • Call the new network "webserver-network" and build it in the "Los Angeles" data center
  • Under the "Advanced" drop down enter in the subnet range of 10.10.10.0/24.
  • Click "Create Network" to proceed

Your web developers want an "Ubuntu 16.04" flavored Linux web server (LAMP). LAMP has all the software packages your developer needs to run the web server (Linux, Apache, MySQL, PHP/Perl).

  • Click "Servers"->"Create Server"
  • Create the new server in the "Los Angeles" zone
  • Select "Linux"->"Ubuntu 16.04 Xenial Xerus" type server
  • Add the "LAMP" software packages
  • Double check that it is connected to the "webserver-network" subnet
  • It is OK that we are not connecting to the Internet so disregard the warning about there not being an Internet connection.
  • Disable "Disaster Recovery" since this is just a demo machine
  • Enter in a password for this new machine and remember the username and password!
  • Click "Create Server" to proceed

Your first web server is now starting up! Take a look at what internal private IP address it has been assigned. It should be on the 10.10.10.0 subnet. Next we start up the web server.

  • Click the gear icon by the new server and select "Console"
  • Login using the username and password that you created above
  • Start the web server with the command "sudo /etc/init.d/apache2 start"

Next we're going to create a floating IP address on the public Internet that can be used to access servers on our internal network.

Floating IP addresses can be moved from server to server. We're going to create one and assign it to this machine. Your server will still have it's private IP address on the webserver-network subnet.

  • Click the gear icon by the new server and select "Connect floating IP"
  • "Create new IP" and "Add floating IP"
  • Use a web browser to connect to the web server at http://floating_IP/

The web page should now start up!!

Uh oh, your web developers broke the server and need a replacement! They want you to startup a replacement server and assign it the floating IP.

  • Create a new Ubunutu Linux server in the Los Angeles zone in the webserver-network subnet
  • Login via the console and start up the web server
  • Under the server gear icon, disconnect the "floating IP" from the old server
  • Assign the existing "floating IP" to the new server
  • Use a web browser to connect to the web server at http://floating_IP/
  • Destroy the old server
  • Double check that the page is alive http://floating_IP/

Congrats! You swapped servers using the floating IPs without anyone knowing!

Business it picking up! You need a second web server to handle the load and load balancing between the two. We're going to take our floating IP and assign it to the load balancer which will send traffic across the two virtual machines.

  • Clone the existing Ubunutu server (don't assign it a floating IP)
  • Create a Load Balancer and assign it the floating IP
  • Drag both servers into the load balancing pool
  • Use a web browser to connect to the web server at http://floating_IP/

Try out pausing each of the servers individually (and both) to validate that the load balancer is working correctly.

Congrats! You are well on your way to building your own OpenStack powered business!

About

OpenStack San Diego Meetup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published