Add instruction how to run in legacy releases.

Change-Id: I3201403d1b55ed0ea8f1c4b1ef7c561c95b44142
This commit is contained in:
Andrey Pavlov 2015-05-28 08:27:59 +03:00
parent 76c7d45442
commit 0a767a7f72
5 changed files with 23 additions and 6 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ ec2_api.egg-info
.testrepository
/functional_tests.conf
/buckets
.venv

View File

@ -226,6 +226,17 @@ EC2 API supports Nova client (>=2.16.0) with no microversion support.
Additional limitations are the same, except network interfaces'
deleteOnTermination.
Preferred way to run EC2 API in these releases is to run it in virtual environment:
- create virtual environment by running command 'python tools/install_venv.py'
- run install inside venv 'tools/with_venv.sh ./install.sh'
- and then you need to run EC2 API services: 'ec2-api', 'ec2-api-metadata'
and 'ec2-api-s3'
Also you need to reconfigure metadata ports in nova(and neutron) config files
if you want metadata to work correctly. (See 'Installation' section).
After these steps you will have working EC2 API services at ports:
8788 for EC2 API and 3334 for S3 API. Don't forget to change keystone endpoints
if you want to run some automated scripts relying on keystone information.
References
==========

View File

@ -29,7 +29,7 @@ OLD_OS_PASSWORD=$OS_PASSWORD
if [[ ! -f $TEST_CONFIG_DIR/$TEST_CONFIG ]]; then
openstack catalog list
openstack endpoint list --long
if [[ "$?" -ne "0" ]]; then
echo "Looks like credentials are absent."
exit 1
@ -57,7 +57,7 @@ if [[ ! -f $TEST_CONFIG_DIR/$TEST_CONFIG ]]; then
eval $(openstack user create "$user_name" --project "$tenant_id" --password "password" --email "$user_name@example.com" -f shell -c id)
user_id=$id
# create network
if [[ -n $(openstack catalog list | grep neutron) ]]; then
if [[ -n $(openstack endpoint list | grep neutron) ]]; then
net_id=$(neutron net-create --tenant-id $tenant_id "private" | grep ' id ' | awk '{print $4}')
subnet_id=$(neutron subnet-create --tenant-id $tenant_id --ip_version 4 --gateway 10.0.0.1 --name "private_subnet" $net_id 10.0.0.0/24 | grep ' id ' | awk '{print $4}')
router_id=$(neutron router-create --tenant-id $tenant_id "private_router" | grep ' id ' | awk '{print $4}')
@ -84,7 +84,7 @@ if [[ ! -f $TEST_CONFIG_DIR/$TEST_CONFIG ]]; then
volume_status() { cinder show $1|awk '/ status / {print $4}'; }
instance_status() { nova show $1|awk '/ status / {print $4}'; }
openstack_image_id=$(openstack image list --long | grep "cirros" | grep " ami " | awk '{print $2}')
openstack_image_id=$(openstack image list --long | grep "cirros" | grep " ami " | head -1 | awk '{print $2}')
volume_id=$(cinder create --image-id $openstack_image_id 1 | awk '/ id / {print $4}')
fail=0
until [[ $(volume_status $volume_id) == "available" ]]; do

View File

@ -308,9 +308,12 @@ sudo rm -f $AUTH_CACHE_DIR/*
#install it
echo Installing package
sudo python setup.py develop
sudo rm -rf build ec2_api.egg-info
if [[ -z "$VIRTUAL_ENV" ]]; then
SUDO_PREFIX="sudo"
fi
$SUDO_PREFIX python setup.py develop
$SUDO_PREFIX rm -rf build ec2_api.egg-info
#recreate database
echo Setuping database
sudo tools/db/ec2api-db-setup deb
$SUDO_PREFIX tools/db/ec2api-db-setup deb

View File

@ -277,6 +277,8 @@ args=(sys.stdout,)
format=%(name)s - %(levelname)s - %(message)s
EOF
pip install MySQL-python
ec2-api-manage --log-config=$log_conf db_sync
rm $log_conf