Project Atomic Quick Start Guide (Atomic)

Source: Internet
Author: User
Tags ssh
http://www.projectatomic.io/docs/quickstart/

If this is the first time you know about the project, we recommend reading the Start Guide and conceptual guidance to understand the concepts and containers of atomic. However, we also provide a quick start guide (or call an impatient reader) to quickly build a separate atomic host and see what the containers and atomic are really busy with. A virtualized client that you need . Virtual Machine Manager (Virt-manager) is a very good KVM-based Linux client. Microsoft and Apple users can try VirtualBox. Make sure that your virtualization client is configured correctly and that you have access to the Internet. A virtual machine image. The atomic host is mirrored by the Fedora Project and the CentOS project. These images can be downloaded from the download page and are available in QCOW2, raw, and vagrantbox formats. VirtualBox users need to be aware of. We didn't make the built-in VirtualBox image, but you can make it yourself using the QEMU-IMG command based on the qcow2 image.

Qemu-img convert-f Qcow2 [Filename].qcow2-o VDI [Filename].vdi
Step by step

Before we start the virtual machine, we have three basic steps that need to be made for virtualization.
1. Prepare cloud-init source ISO
2. Create a virtual host for the atomic host
3. preparing cloud-init Source images for Docker add and configure storage

In order to atomic the host to run the custom configuration, we use Cloud-init

When your atomic host starts, you need to create a source data ISO to provide temporary data. System data appears through the User-data file through the Meta-data file and the profile data. We will create a password and SSH key for the default user. The source data ISO is created here in the run your virtualization provider.
1. Create a meta-data file that loves you, including the host name and instance ID you want. If you want to modify this information on a host that is already running, you need to increase the number of instance IDs. That's why Cloud-init identifies a particular instance.

VI meta-data
instance-id:atomic-host001
local-hostname:atomic01.example.org
Create a User-data file
Note: The ' #cloud-config ' at the very beginning of the file is mandatory, not a comment.
If you have multiple admin accounts and SSH keys to access the default user, you can add the Ssh-rsa command line.
VI user-data
#cloud-config
password:atomic
ssh_pwauth:true
chpaswd: {expire:false}

ssh_ Authorized_keys:
  -Ssh-rsa Foo@bar.baz (inert ~/.ssh/id_rsa.pub here)
After creating the User-datah and Meta-data files, make the ISO file. Make sure that the user running the LIBVIRT program has permission to access the crafted image.
Genisoimage-output init.iso-volid cidata-joliet-rock User-data meta-data

Later you will bind the ISO file you just made to the virtual machine as a CD-ROM. Create a atomic host virtual machine

We will then use the QCOW2 type of image for Virt-manager and VirtualBox. For Virt-manager, you can use mirroring directly. For VirtualBox, the QCOW2 format needs to be converted to the VDI format for VirtualBox.

Qemu-img convert-f Qcow2 [Filename].qcow2-o VDI [Filename].vdi
Create with Virt-manager

Here's how to use atomic with Virt-manager in your Linux. The following procedure is done using Virt-manager in Fedora 21. If you use different versions of Fedora, there may be a slight difference in the steps. On the menu bar, select New virtual Machine, File--. The new Virtual Machine dialog box opens. Select the disk image that already exists and click Continue. The next Page dialog box appears. Click Browse. The Locate and create Storage volume window opens. Click Browse locally. The locally existing Storage Volumes dialog box opens. Navigate to the downloaded virtual machine file, select it, and click Open. In the New Virtual Machine dialog box, select Type Linux, version select Fedora 21 or update, click Continue. To adjust the memory and CPU settings of the virtual machine, click Continue. Tick the pre-installation custom configuration and click Continue. This allows us to add metadata ISO settings before the virtual machine starts.
Note: When we run Virt-mnager in Red Hat 6 Enterprise or CentOS6 Enterprise Edition, the disk format of the virtual machine does not start if it is not converted from raw to Qcow2.

To add a CD-ROM device to a source data source
1. In the Virt-managerj interface, click Open your atomic machine. Click on the top bar to view details.
2. Locate the Add hardware in the lower left corner.
3. Select storage, select Management or other existing out. Browse and select the Init.iso image you just created. Modify the device type to CD-ROM. Click Done and we're done creating and adding this store.

Created with VirtualBox.
The steps to download are in Microsoft or Apple and Linux, using VirtualBox to try Atomic.
1. Click the VirtualBox toolbar icon. The Create Virtual machine window opens.
2. Enter a name for the virtual machine, select Type Linux, Version fedora, and click Continue.
3. Adjust the memory of the virtual machine and click Continue.
4. Select the option to use a virtual hard disk that already exists, browse the file location, and click Create. So the virtual machine is created.

To add a CD-ROM device to metadata source
1. In the VirtualBox GUI, click Settings for the atomic virtual machine.
2. On the storage page, locate the Idecontroller and add the CD/DVD device.
3. Select the case and select the Init.iso that has been created.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.