Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Using Virtuozzo in the Amazon EC2

399 bytes added, 08:37, 26 December 2015
Marked this version for translation
<translate>
<!--T:1-->
To allow customers to familiarize themselves with improved containers technology of Virtuozzo and to maximize AWS instance utilization along with security and isolation we introduce Virtuozzo image for Amazon EC2.
<!--T:2-->
Please note that:
* Virtuozzo only supports containers then deployed on Amazon EC2.
* Virtuozzo 7 image is shipped for only one version: Virtuozzo 7.
== Steps to provisioning ==<!--T:3-->
<!--T:4-->
* Log into the [https://aws.amazon.com/marketplace AWS Marketplace], search for the AMI from Odin as the publisher, then click the selected product.
* Check the product description to verify it suits your needs. Then click the "Continue" button.
* You can choose the ''Manual Launch'' with EC2 console by the pressing corresponding tab, or continue with the 1-Click Launch using predefined settings (the 1-Click Launch option does not allow you to modify the default storage size and type when creating the instance: 30 GB magnetic storage. To change disk storage after deployment, see the Amazon AWS documentation -[http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html Expanding the Storage Space of a Volume].
=== 1-Click Launch (predefined settings) ===<!--T:5-->
<!--T:6-->
* Select the "Region" to deploy the instance and the EC2 Instance Type depending on your needs (Note: the price is different for different regions).
* In VPC settings, select where your instance will be deployed: EC2 classic (recommended) or your personal Virtual Private Cloud. If the VPC network is selected, please make sure that your virtual network is configured to provide internet access to the instance is being deployed. The main differences between EC2-classic and VPC are described in [http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html Amazon EC2 and Amazon Virtual Private Cloud (VPC)]. Find more information about VPC in the [http://aws.amazon.com/documentation/vpc/ Amazon VPC documentation].
To change the disk storage after deployment, check the Amazon AWS documentation: [http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html Expanding the Storage Space of a Volume].
=== Manual Launch with EC2 console ===<!--T:7-->
<!--T:8-->
Adjust additional settings such as disk space before launch.
<!--T:9-->
* Click on the Manual Launch tab.
* Click the Launch with EC2 Console button in the Region the instance is to be deployed.
# ssh -i <path to private key> ec2user@<elastic or public IP>
<!--T:10-->
* To operate with OpenVZ you need to enter sudo mode:
<!--T:11--># sudo -i
== Configure the external IP address for the container ==<!--T:12-->
<!--T:13-->
To access to your container through the Internet you can attach additional Private IPs and Elastic IPs to the instance and then attach every Private IP to the specific container.
<!--T:14-->
Please review this article to learn how to assign additional Elastic IPs to the instance http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html. If you need additional information on IP addressing in Amazon EC2 please see this article http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html
<!--T:15-->
Login to the Amazon EC2 Management Console.
<!--T:16-->
Assign new Private IP to your Instance:
<!--T:17-->
* Choose your instance;
* Click Actions > Networking > Manage Private IP Addresses;
* Click Yes, Update.
<!--T:18-->
Assign new Elastic IP to corresponding Private IP of your instance:
<!--T:19-->
* Choose Elastic IP section in the menu;
* Click Allocate New Addresses;
* Click Associate.
<!--T:20-->
Connect to your OpenVZ instance via SSH.
<!--T:21-->
Create example container:
<!--T:22--># prlctl create 100700 --vmtype ct
<!--T:23-->
Assign Private IP and DNS server to the container:
<!--T:24--># prlctl set 100700 --ipadd <Private IP address>/24
# prlctl set 100700 --nameserver 8.8.8.8
<!--T:25-->
Start the container:
<!--T:26--># prlctl start 100700
<!--T:27-->
Enter the container and set root password:
<!--T:28--># prlctl enter 100700
# passwd
<!--T:29-->
Connect to the container via SSH:
<!--T:30--># ssh root@<Elastic IP Address>
== Configure NAT on the instance ==<!--T:31-->
<!--T:32-->
If you do not want to attach multiple Elastic IPs to your instance you may also to [[Using_NAT_for_container_with_private_IPs|configure internal NAT]] on your OpenVZ instance.
== See also ==<!--T:33-->
<!--T:34-->
* [http://www.slideshare.net/kentaroebisawa/quick-start-guide-using-virtuozzo-7-on-aws-ec2 Quick Start Guide using Virtuozzo 7 (β) on AWS EC2]
</translate>