cloudstack/docs/tmp/en-US/html/aws-ec2-user-setup.html

46 lines
6.7 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>10.4. AWS API User Setup Steps</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Installation_Guide-4.0.0-incubating-en-US-1-" /><link rel="home" href="index.html" title="CloudStack Installation Guide" /><link rel="up" href="aws-interface-compatibility.html" title="Chapter 10. Amazon Web Service Interface Compatibility" /><link rel="prev" href="aws-ec2-configuration.html" title="10.3. Enabling the AWS API Compatible Interface" /><link rel="next" href="aws-ec2-timeouts.html" title="10.5. Using Timeouts to Ensure AWS API Command Completion" /></head><body><p id="title"><a class="left" href="http://cloudstack.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://docs.cloudstack.org"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="aws-ec2-configuration.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="aws-ec2-timeouts.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="aws-ec2-user-setup" lang="en-US"><div class="titlepage"><div><div><h2 class="title" id="aws-ec2-user-setup">10.4. AWS API User Setup Steps</h2></div></div></div><div class="para">
In general, users need not be aware that they are using a translation service provided by CloudStack. They need only send AWS API calls to CloudStack's endpoint, and it will translate the calls to the native API. Users of the Amazon EC2 compatible interface will be able to keep their existing EC2 tools and scripts and use them with their CloudStack deployment, by specifying the endpoint of the management server and using the proper user credentials. In order to do this, each user must perform the following configuration steps:
</div><div class="para">
<div class="itemizedlist"><ul><li class="listitem"><div class="para">
Generate user credentials and register with the service.
</div></li><li class="listitem"><div class="para">
Set up the environment variables for the EC2 command-line tools.
</div></li><li class="listitem"><div class="para">
For SOAP access, use the endpoint http://<em class="replaceable"><code>CloudStack-management-server</code></em>:8080/awsapi. The <em class="replaceable"><code>CloudStack-management-server</code></em> can be specified by a fully-qualified domain name or IP address.
</div></li></ul></div>
</div><div class="section" id="aws-ec2-user-registration"><div class="titlepage"><div><div><h3 class="title" id="aws-ec2-user-registration">10.4.1. AWS API User Registration</h3></div></div></div><div class="para">
Each user must perform a one-time registration. The user follows these steps:
</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
Obtain the following by looking in the CloudStack UI, using the API, or asking the cloud administrator:
</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
The CloudStack server's publicly available DNS name or IP address
</div></li><li class="listitem"><div class="para">
The user account's API key and Secret key
</div></li></ul></div></li><li class="listitem"><div class="para">
Generate a private key and a self-signed X.509 certificate. The user substitutes their own desired storage location for /path/to/… below.
</div><div class="para">
<pre class="programlisting">$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem</pre>
</div></li><li class="listitem"><div class="para">
Register the mapping from the X.509 certificate to the API/Secret keys. Download the following script from http://download.cloud.com/releases/3.0.3/cloudstack-aws-api-register and run it. Substitute the values that were obtained in step 1 in the URL below.
</div><div class="para">
<pre class="programlisting">$ cloudstack-aws-api-register --apikey=<em class="replaceable"><code>Users CloudStack API key</code></em> --secretkey=<em class="replaceable"><code>Users CloudStack Secret key</code></em> --cert=<em class="replaceable"><code>/path/to/cert.pem</code></em> --url=http://<em class="replaceable"><code>CloudStack.server</code></em>:8080/awsapi</pre>
</div></li></ol></div><div class="note"><div class="admonition_header"><h2>Note</h2></div><div class="admonition"><div class="para">
A user with an existing AWS certificate could choose to use the same certificate with CloudStack, but the public key would be uploaded to the CloudStack management server database.
</div></div></div></div><div class="section" id="aws-api-tools-setup"><div class="titlepage"><div><div><h3 class="title" id="aws-api-tools-setup">10.4.2. AWS API Command-Line Tools Setup</h3></div></div></div><div class="para">
To use the EC2 command-line tools, the user must perform these steps:
</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
Be sure you have the right version of EC2 Tools. The supported version is available at <a href="http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip">http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip</a>.
</div></li><li class="listitem"><div class="para">
Set up the environment variables that will direct the tools to the server. As a best practice, you may wish to place these commands in a script that may be sourced before using the AWS API translation feature.
</div><pre class="programlisting">$ export EC2_CERT=/path/to/cert.pem
$ export EC2_PRIVATE_KEY=/path/to/private_key.pem
$ export EC2_URL=http://<em class="replaceable"><code>CloudStack.server</code></em>:8080/awsapi
$ export EC2_HOME=/path/to/EC2_tools_directory</pre></li></ol></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="aws-ec2-configuration.html"><strong>Prev</strong>10.3. Enabling the AWS API Compatible Interface</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="aws-ec2-timeouts.html"><strong>Next</strong>10.5. Using Timeouts to Ensure AWS API Command Co...</a></li></ul></body></html>