Step 1: To launch an instance on AWS
You need to create your account on AWS (please refer to AWS links for how to create the account).
1. You need to create a VPC and a subnet for yourself.
Go to the VPC service (Virtual Private Cloud), under "Your VPCs" -> select "Create VPC". You could specify a CIDR block, e.g. 192.0.0.0/24, keep the "Tenancy" be "default". You need to make sure the DNS settings are selected, including
Enable DNS resolution
Enable DNS hostname support for instances launch
Under the "Subnets" -> select "Create Subnet". Select the VPC you created just now (vpc-xxxxxx(192.0.0.0/24)), and specify the CIDR block, e.g. 192.0.0.0/24.
Go to "Internet Gateway" to create and attach an internet gateway for the created VPC.
Go to "Route table" and select the route table of the created VPC. To add one route for the internet gateway created just now (target = "igw-cxxxxxx"), and configure the "destination" as "0.0.0.0/0"
2. Launch a new instance
Then go to AWS EC2 service -> Instances, click the "Launch Instance" button.
You need to select the Amazon Machine Image of Red Hat Enterprise Linux 6.4 (64 bit), OpenStack DevStack couldn't support the Amazon Linux yet.
Just select ti.micro as the image (you want to be free, right?), and "Next: Configure Instance Details"
In the "Network" option, select the "vpc-xxxxxx(192.0.0.0/24)" we created just now
You could enable the "Monitoring".
Click the "Review and Launch", and you might see a warning saying that "Your security group is openning to the world". It doesn't matter. To ensure all the functions are correct, let's not set too complex security rule in current stage.
Clict "Launch", then it will show the selection of key pair. If you don't have created keypair before, you could select to "Create a new key pair" here. Otherwise, you'd better to use an existing key pair. Once you create a new key pair in this step, PLEASE remember to save the keypair file to your laptop. The key pair file generated by AWS is .pem file. You need to use Puttygen to convert it to the .ppk (Putty private key) file. Just download the Puttygen from website and do it. Very simple step.
Once it is done, you could launch the new instance.
You could go back to the EC2 service -> instance to check the instance status. Please remember which region you created the instance. Otherwise you will not find your instance. In my practise, I created the instances in N.Virginia
Once you find the new instance status is "running", and public DNS is there, you could log into your instance.
Step 2: Log into the VM of AWS
Let's use Putty to log into the VM. Most of the user name will be "ec2-user". So, if the DNS is
ec2-54-84-58-163.compute-1.amazonaws.com
You should input "ec2-user@ec2-54-84-58-163.compute-1.amazonaws.com" in Putty.
On the left side of Putty dialog, select "Connection" -> "SSH" ->"Auth", input the key file (.ppk), then open the instance.
Step 3: Install DevStack
Install git: sudo yum install git
Install devstack by: git clone https://github.com/openstack-dev/devstack.git
cd devstack
git checkout stable/havana
Create the localrc file like following:
DATABASE_PASSWORD=passw0rd
RABBIT_PASSWORD=passw0rd
SERVICE_TOKEN=passw0rd
SERVICE_PASSWORD=passw0rd
ADMIN_PASSWORD=passw0rd
FLOATING_RANGE=10.0.0.0/24
FLAT_INTERFACE=eth0
LOGFILE=/home/ec2-user/stack.sh.log
Q_FLOATING_ALLOCATION_POOL=start=10.0.0.100,end=10.0.0.120
PUBLIC_NETWORK_GATEWAY=10.0.0.1
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-13
enable_service q-meta
enable_service neutron
enable_service tempest
- execute: ./stack.sh