This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
storperf:installing [2015/12/15 21:05] Mark Beierl created |
storperf:installing [2016/03/08 18:58] (current) Mark Beierl [Running StorPerf Container] |
||
---|---|---|---|
Line 10: | Line 10: | ||
Requirements: | Requirements: | ||
- | * | + | * Docker must be installed |
+ | * Jump Host must have access to the OpenStack Controller API | ||
+ | * Jump Host must be able to access StorPerf subnet | ||
+ | |||
+ | # Create the StorPerf network | ||
+ | neutron net-create StorPerf_Agent_Network | ||
+ | neutron subnet-create StorPerf_Agent_Network 192.168.0.0/16 --name StorPerf_Agent_Subnet --gateway 192.168.0.1 | ||
+ | |||
+ | # Create the StorPerf Agent Flavor | ||
+ | nova flavor-create "StorPerf Agent" auto 4096 4 4 | ||
===== Running StorPerf in a VM ===== | ===== Running StorPerf in a VM ===== | ||
Line 29: | Line 38: | ||
# Put an Ubuntu Image in glance | # Put an Ubuntu Image in glance | ||
wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img | wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img | ||
- | glance image-create --name 'StorPerf Ubuntu 14.04' --is-public=true --disk-format=qcow2 --container-format=bare --file=trusty-server-cloudimg-amd64-disk1.img | + | glance image-create --name 'StorPerf Ubuntu 14.04' --visibility public --disk-format=qcow2 \ |
+ | --container-format=bare --file=trusty-server-cloudimg-amd64-disk1.img | ||
| | ||
# Create the StorPerf network | # Create the StorPerf network | ||
- | neutron net-create StorPerf-net | + | neutron net-create StorPerf_Agent_Network |
- | neutron subnet-create StorPerf-net 192.168.0.0/16 --name StorPerf-subnet --gateway 192.168.0.1 | + | neutron subnet-create StorPerf_Agent_Network 192.168.0.0/16 --name StorPerf_Agent_Subnet --gateway 192.168.0.1 |
| | ||
- | | + | # Create the StorPerf Flavor - Depending on how much data you are collecting, you may want to make |
+ | # the disk larger. | ||
+ | nova flavor-create StorPerf auto 8192 120 8 | ||
+ | nova flavor-create "StorPerf Agent" auto 4096 4 4 | ||
+ | |||
+ | # (Optional) Create a keypair for your StorPerf master | ||
+ | nova keypair-add StorPerf > StorPerf.pem | ||
+ | # Or, if you have access to the StorPerf repository you may import the StorPerf key | ||
+ | nova keypair-add --pub_key storperf_rsa.pub StorPerf | ||
+ | |||
+ | # Create the StorPerf VM itself. Here we use the network ID generated by OPNFV FUEL. | ||
+ | ADMIN_NET_ID=`neutron net-list | grep 'admin_internal_net ' | awk '{print $2}'` | ||
+ | STORPERF_ID=`neutron net-list | grep 'StorPerf_Agent_Network ' | awk '{print $2}'` | ||
+ | |||
+ | nova boot --nic net-id=$ADMIN_NET_ID --nic net-id=$STORPERF_ID --flavor StorPerf --key-name=StorPerf \ | ||
+ | --image 'StorPerf Ubuntu 14.04' 'StorPerf Master' | ||
+ | At this point, you may associate a floating IP with the StorPerf master VM. | ||
+ | |||
+ | ssh -i StorPerf.pem ubuntu@10.9.15.138 | ||
+ | |||
+ | === Docker Installation === | ||
+ | |||
+ | The following procedure will install Docker on Ubuntu 14.04. | ||
+ | |||
+ | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | ||
+ | cat << EOF | sudo tee /etc/apt/sources.list.d/docker.list | ||
+ | deb https://apt.dockerproject.org/repo ubuntu-trusty main | ||
+ | EOF | ||
+ | | ||
+ | sudo apt-get update | ||
+ | sudo apt-get install -y docker-engine | ||
+ | sudo usermod -aG docker ubuntu | ||
+ | |||
+ | ===== Running StorPerf Container ===== | ||
+ | |||
+ | You must have your OpenStack Controller environment variables defined and passatd to the StorPerf container. The easiest way to do this is to put the rc file contents into a clean file the looks similar to this: | ||
+ | |||
+ | OS_AUTH_URL=http://10.13.182.243:5000/v2.0 | ||
+ | OS_TENANT_ID=e8e64985506a4a508957f931d1800aa9 | ||
+ | OS_TENANT_NAME=admin | ||
+ | OS_PROJECT_NAME=admin | ||
+ | OS_USERNAME=admin | ||
+ | OS_PASSWORD=admin | ||
+ | OS_REGION_NAME=RegionOne | ||
+ | |||
+ | There are some ports that the container can expose: | ||
+ | |||
+ | * 22 for SSHD. Username and password are root/storperf. This is used for CLI access only | ||
+ | * 5000 for StorPerf ReST API. | ||
+ | * 8000 for StorPerf's Graphite Web Server | ||
+ | |||
+ | You might want to have the local disk used for storage as the default size of the docker container is only 10g. This is done with the -v option, mounting under /opt/graphite/storage/whisper | ||
+ | |||
+ | Running the StorPerf Container with all ports open and a local disk: | ||
+ | |||
+ | mkdir -p ~/carbon | ||
+ | sudo chown 33:33 ~/carbon | ||
+ | docker run -t --env-file admin-rc -p 5022:22 -p 5000:5000 -p 8000:8000 -v ~/carbon:/opt/graphite/storage/whisper --name storperf opnfv/storperf | ||
+ | | ||
+ | This will then permit ssh to localhost port 5022 for CLI access. | ||