https://github.com/stackforge/ec2-api
1)
https://github.com/stackforge/ec2-api.git
2)
export OS_USERNAME=admin
export OS_PASSWORD=contrail123
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://10.140.218.21:35357/v2.0
3)
#sudo apt-get install python-pip
#sudo pip install virtualenv
#sudo pip install -r requirements.tx
4)
./install.sh
*To fix EnvironmentError: mysql_config not found
#sudo apt-get install libmysqlclient-dev
5)
After installation
#ls /usr/local/bin/ | grep ec2-
ec2-api
ec2-api-manage
ec2-api-metadata
ec2-api-s3
6)
/usr/local/bin/ec2-api
Error:
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'SplitResult'
Fix:
#sudo gdebi python-six_1.9.0-3_all.deb
7)
/usr/local/bin/ec2-api
Error:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?
Fix:
* To fix this issue, goto cloned directory of ec2-api "#cd /home/saju/ec2-api"
* Then run "/usr/local/bin/ec2-api"
8)
#cd /home/saju/ec2-api
a)
ec2-api
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api
2015-06-01 18:44:11.687 29105 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:44:11.689 29105 INFO ec2api.wsgi [-] ec2api listening on 0.0.0.0:8788
2015-06-01 18:44:11.693 29105 INFO ec2api.wsgi.server [-] (29105) wsgi starting up on http://0.0.0.0:8788/
b)
ec2-api-metadata
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api-metadata
2015-06-01 18:45:14.997 29116 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:45:14.999 29116 INFO ec2api.wsgi [-] metadata listening on 0.0.0.0:8789
2015-06-01 18:45:15.004 29116 INFO ec2api.wsgi.server [-] (29116) wsgi starting up on http://0.0.0.0:8789/
c)
ec2-api-s3
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api-s3
2015-06-01 18:45:48.502 29128 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:45:48.505 29128 INFO ec2api.wsgi [-] S3 Objectstore listening on 0.0.0.0:3334
2015-06-01 18:45:48.508 29128 INFO ec2api.wsgi.server [-] (29128) wsgi starting up on http://0.0.0.0:3334/
9)
a)
#cd /home/saju/ec2-api
b)
Open a screen session
#screen -S ec2api
c)
Create 3 screen tabs
Ctrl + a, then c --> 3 times
d)
Run "ec2-api", "ec2-api-metadata" and "ec2-api-s3" in each tab.
/usr/local/bin/ec2-api
/usr/local/bin/ec2-api-metadata
/usr/local/bin/ec2-api-s3
10)
a)
#sudo apt-get install awscli
b)
Run "keystone ec2-credentials-list" and copy access and secret keys
b)
#mkdir ~/.aws
#vim ~/.aws/config
[default]
aws_access_key_id = 32c4af37576c421b8dc59be822f6502e
aws_secret_access_key = 47810cb60434424caf622860d5c4e64c
region = nova
c)
#aws --endpoint-url http://10.0.2.15:8788/services/Cloud ec2 describe-instances
* Check the log in the window where /usr/local/bin/ec2-api is running.
d)
Error:
ERROR ec2api.api.ec2utils ValueError: time data '2015-06-01T14:11:26.400231' does not match format '%Y-%m-%dT%H:%M:%SZ'
Fix:
In /ec2api/api/__init__.py set "expired = False" in method "__call__" of class "Requestify".
e)
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-images
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-vpcs
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-route-tables
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 create-vpc --cidr-block 10.4.4.0/24
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 create-subnet --vpc-id vpc-e6d1d26a --cidr-block 10.4.4.0/24
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 delete-subnet
1)
https://github.com/stackforge/ec2-api.git
2)
export OS_USERNAME=admin
export OS_PASSWORD=contrail123
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://10.140.218.21:35357/v2.0
3)
#sudo apt-get install python-pip
#sudo pip install virtualenv
#sudo pip install -r requirements.tx
4)
./install.sh
*To fix EnvironmentError: mysql_config not found
#sudo apt-get install libmysqlclient-dev
5)
After installation
#ls /usr/local/bin/ | grep ec2-
ec2-api
ec2-api-manage
ec2-api-metadata
ec2-api-s3
6)
/usr/local/bin/ec2-api
Error:
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'SplitResult'
Fix:
#sudo gdebi python-six_1.9.0-3_all.deb
7)
/usr/local/bin/ec2-api
Error:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?
Fix:
* To fix this issue, goto cloned directory of ec2-api "#cd /home/saju/ec2-api"
* Then run "/usr/local/bin/ec2-api"
8)
#cd /home/saju/ec2-api
a)
ec2-api
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api
2015-06-01 18:44:11.687 29105 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:44:11.689 29105 INFO ec2api.wsgi [-] ec2api listening on 0.0.0.0:8788
2015-06-01 18:44:11.693 29105 INFO ec2api.wsgi.server [-] (29105) wsgi starting up on http://0.0.0.0:8788/
b)
ec2-api-metadata
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api-metadata
2015-06-01 18:45:14.997 29116 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:45:14.999 29116 INFO ec2api.wsgi [-] metadata listening on 0.0.0.0:8789
2015-06-01 18:45:15.004 29116 INFO ec2api.wsgi.server [-] (29116) wsgi starting up on http://0.0.0.0:8789/
c)
ec2-api-s3
saju@ubuntu:~/ec2-api$ /usr/local/bin/ec2-api-s3
2015-06-01 18:45:48.502 29128 WARNING oslo_log.versionutils [-] Deprecated: WritableLogger() is deprecated as of Liberty and may be removed in M. It will not be superseded.
2015-06-01 18:45:48.505 29128 INFO ec2api.wsgi [-] S3 Objectstore listening on 0.0.0.0:3334
2015-06-01 18:45:48.508 29128 INFO ec2api.wsgi.server [-] (29128) wsgi starting up on http://0.0.0.0:3334/
9)
a)
#cd /home/saju/ec2-api
b)
Open a screen session
#screen -S ec2api
c)
Create 3 screen tabs
Ctrl + a, then c --> 3 times
d)
Run "ec2-api", "ec2-api-metadata" and "ec2-api-s3" in each tab.
/usr/local/bin/ec2-api
/usr/local/bin/ec2-api-metadata
/usr/local/bin/ec2-api-s3
10)
a)
#sudo apt-get install awscli
b)
Run "keystone ec2-credentials-list" and copy access and secret keys
b)
#mkdir ~/.aws
#vim ~/.aws/config
[default]
aws_access_key_id = 32c4af37576c421b8dc59be822f6502e
aws_secret_access_key = 47810cb60434424caf622860d5c4e64c
region = nova
c)
#aws --endpoint-url http://10.0.2.15:8788/services/Cloud ec2 describe-instances
* Check the log in the window where /usr/local/bin/ec2-api is running.
d)
Error:
ERROR ec2api.api.ec2utils ValueError: time data '2015-06-01T14:11:26.400231' does not match format '%Y-%m-%dT%H:%M:%SZ'
Fix:
In /ec2api/api/__init__.py set "expired = False" in method "__call__" of class "Requestify".
e)
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-images
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-vpcs
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 describe-route-tables
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 create-vpc --cidr-block 10.4.4.0/24
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 create-subnet --vpc-id vpc-e6d1d26a --cidr-block 10.4.4.0/24
#aws --endpoint-url http://192.168.56.101:8788/services/Cloud ec2 delete-subnet
No comments:
Post a Comment