OpenStack Compass

Embed Size (px)

Citation preview

  • 8/19/2019 OpenStack Compass

    1/18

    Getting Start

    Step 1 - InstallCompass

    Step 2 - CompassWeb

    Step 3 - CreateCluster

    Step 4 - DiscoverServers

    Step 5 - OS GlobalConfig

    Step 6 - Network

    Step 7 - Partition

    Step 8 - Security

    Step 9 - RoleAssignment

    Step 10 - NetworkMapping

    Step 11 - Review andDeployment

    Step 12 - OpenStack

    Appendix - FAQ

    IntroductionFor those users who look to use Compass in their production environment,this instruction gives a thorough walkthrough on how to use Compass Web

    UI to achieve your deployment goals. Screenshot examples are also usedfor better understanding and illustration. The whole process can be dividedinto two main parts: 1. Install Compass and 2. Use Compass to deploy acluster. The following installation of process demonstrates “singel controllermulti compute” scenario deployed on CentOS.

    Getting StartTo get started, we need to have an environment ready for Compass andtarget system. Physical machines are recommended in productionenvironments. For the sakes of simplicity and ease of demonstration, fourvirtual machines are used in this instruction:

    One Compass VMThree VMs for Compass to deploy OpenStack on.

    There are some basic network requirements as well, please refer to thefollowing image:

    Compass Production Environment - An Illustration of Compass

    Magic

    Introduction

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    2/18

    Management network in this instruction is also overlapped byStorage and Tenant network.Compass server needs to have at least two network interfaces. Oneconnects to the internet, and the other one connects to themanagement network.Network node(also controller and storage node, in this case) needsto have at least two interfaces, one connects to the managementnetwork and the other one connects to the external network.All other nodes only need to connect to the management network.(Details about these networks will be further discussed in later steps)

    The machines you are going to deploy OpenStack on need to bebaremetals, even the operation system that already exists will be forciblyremoved.

    Step 1 - Install CompassCompass VM needs to have a running operating system. Compass has anautomatic install script to set up itself, but currently it only supports CentOS.

    Once you have installed CentOS, run yum -y install git to get git.

    When git is ready, run the command: git clone git://git.openstack.org/stackforge/compass-core.git .

    Go to compass-core directory: cd compass-core Run ./install/install.sh to install compass.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    3/18

    The install scripts will be asking some questions to allow users to customizetheir environments. The content bewteen parenthesis is the default setting.Press “Enter” to go with default setting. Here we will explain thosequestions to make them easier to understand.

    Please enter the nic

    Compass uses PXE(BOOTP) and DHCP to install OSes onto serversusing network installation. This is asking you to input which nic on theCompass server you would like the DHCP service to listen on.Please note that although the default DHCP server setting listens toall interfaces on Compass server, it is recommended that you set thisas the interface that is connected to the Management network.

    Please enter the ipaddr

    This is asking you for your server’s IP address. The example value is

    calculated using the input from Q1. It gets the IP address of theinterface you chose in Q1. In most cases, you only need to hit enter.

    Please enter the netmask

    This is self-explanatory. Please enter the netmask you have set upfor management network.

    Please enter the option_router

    The option_router variable is used as the gateway for PXE to routethe TFTP request traffic. The example value is calculated fromCompass server’s default gateway. Thus it is not always correct. It isimportant that you enter the gateway you have set up for yourmanagement network, because a wrong value may FAIL your futuredeployment.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    4/18

    Please enter the ip_start

    The ip_start variable is for DHCP server to assign IPs. The ip_startand ip_end values give DHCP server an IP pool.

    Please enter the ip_end

    See Q5.

    Please enter the nextserverThe next_server acts as the TFTP server. The example value gets itfrom Compass server’s IP on the management interface. In mostcases the example values are correct.

    Would you like to set up a local repository

    This question cannot be answered by just hitting enter. A local repo is

    a repo that contains all the packages to install OpenStack. Setting upa local repo on Compass server makes the deployment much faster.Also it makes it possible to have an isolated OpenStack environmentwithout internet access. Upon entering “y”, Compass will drag thelocal repo from the internet and make it available to all the hosts.

    Please enter the nameserver_domains

    This helps you setup the FQDN for Compass and its hosts.

    Please enter the web_source

    This question is asking for the source code url for Compass web UI.Just hit enter, it will be downloaded.

    Please enter the adapters_source

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    5/18

    Compass adapters are also some source code for Cobbler and Chefto use. See Q10 for instructions.

    Once you answered all above questions, you can hand the installation overto Compass installation script. It will take a while to finish, depending onyour location and network bandwidth.

    Step 2 - Compass-WebOnce you completed the installation, open your browser(Chrome andFirefox are recommended) and type the IP of Compass server on theaddress bar. Then the UI will take you to the login page.

    Use the below username and password to login.

    Username: [email protected]: admin

    Step 3 - Create ClusterAfter you log in, you will see this page, click on “+ New Cluster” on the topright.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    6/18

    Cluster name: enter your cluster name1.

    Target system: target system is what you would like your cluster tobe. Currently we support OpenStack and OpenStack+Ceph. In thisinstruction, we use OpenStack Icehouse as the target system.

    2.

    OS: The OS breeds that will be installed to the hosts. We supportboth CentOS-6.5 and Ubuntu-12.04.

    3.

    Flavor: This is essentially how you fabric your cluster. There arefollowing options:

    a. All-in-one: Choose this if you only have one server, and allcomponents of your target system will be deployed to that server.

    b. Single-Controller, Multi-Compute. This flavor is designedspecifically for OpenStack. If you have a relatively small number ofservers(e.g: 2-10 servers). You may consider this option. Compass

    will prepare and render some environment templates into clusterdeployment configurations for one controller node and multiplecompute nodes.

    c. Multinodes: Choose this option if you have a relatively largernumber of servers(10+ servers). This gives a finer granularity of rolesfor you to assign. The concept of roles will be further discussed inlater steps. Keep in mind that this flavor is designed for moreadvanced users who possess a deeper knowledge of the targetsystem.

    4.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    7/18

    Step 4 - Discover ServersOnce you have created the cluster. You will enter a wizard. The first step on

    the navigation bar is “Server Selection”. Right now there should be nothingin the server table(unless you run a server discovery prior to creation of thecluster). Compass has a mechanism to discover all the server’s MACaddresses of the interfaces that are connected to a specific switch usingSNMP. Click on the “Discover Servers” button to get the servers.

    As you can see in the image below, Compass UI pops up a form for you tofill in your switch information. This switch should be the switch of yourmanagement network. First you need to make sure the Switch has SNMP

    enabled and uses standard MIBs. Compass currently supports Huawei, HP,Arista and PICA8 switches. You need to enter your Switch IP, version andCommunity for Compass to discover servers. The default version is “2c”and default community is “public”. If you are cannot proceed with defaultvalues and having trouble getting the specific values for your switch, pleaseconsult the switch manufacturers for correct information.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    8/18

    Once you have filled in the switch information, click add and the switch willshow up on the right hand side. Select the switches from the list ofswitches, then click “Discover Servers”. Compass will discover all the

    servers that are connected to the switch ip you entered.

    After a few seconds, you should be able to get a list of servers with theirMAC addresses, switches they are connected to and their port numbers.Select the servers you would like to deploy, by checking their switch IPsand port numbers based on your deployment plan. The search bar allowsyou to find the desired server quickly, and by checking the “Hide UnselectedServers” box, you can get a clearer view of the servers you have selected.If you are unable to find server, please refer to Appendix for more

    information.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    9/18

    Step 5 - OS Global ConfigIn this step you are going to tell Compass what OS configuration you wouldlike to have on your servers. Most of them are self-explanatory, some ofthem have been pre-filled. But the following items should be dealt withcarefully:

    NTP Server : Compass manages NTP service. You can fill in Compassserver IP here. Or if you have existing NTP servers in your cluster/datacenter. You can fill one of them here.

    DNS Servers : Same as NTP server, if you do not have an existing DNSserver, Compass also takes care of DNS service. You can fill in Compassserver IP here.

    Local Repository : This is the repository for Compass to drag packagesduring the deployment. If you have pre-setup the repository somewherereachable in your cluster or you chose ‘y’ when Compass install scriptasked you if you would like to setup a local repository, you may fill in thevalue here. Local repo behavior will be enabled in a global scope once avalue is set in this step.

    When you have filled in all the required fields, click “Next” and it will bringyou to the network step.

    ass http://www.syscompass.org/install

    8 09-03-201

  • 8/19/2019 OpenStack Compass

    10/18

    Step 6 - NetworkNetwork configurations have always been complicated when deployingdistributed systems. Compass has made network configurations ofOpenStack easy and intuitive. As you can see in the image below, bydefault, Compass lists 4 network interfaces. Click on “Autofill” button andyou will get a detailed view of networks. You can add or remove interfacesby clicking on the “+” and “-“ on the right. Once you have the correctnumber of interfaces, choose one of them as your management networkinterface(this interface should match your network plan). This can be doneby checking the box of the interface under “is Mgmt Network” column. Youthen need to set one interface in “promisc” mode. Such interface is used forassigning external floating IPs. Do not set promisc and management onthe same network interface.

    Now add subnets to the interfaces by clicking on “Add Subnet” button. Then

    you can type in your subnet config. Subnets should follow the CIDR formatsuch as 192.168.1.0/24 . You can click on “+” to add more subnets.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    11/18

    Once you complete creating subnets, Compass will go back to the networkpage. Now you need to map subnets to interfaces. There are drop-downmenus for each interface under “subnet” column. You should carefullychoose the correct subnet for each interface.

    After mapping subnets to interfaces, you can start assigning IPs toindividual servers. Compass-web can help you batch assign IPs. For eachnetwork interface, there is an Autofill rule . You can set a starting IP foreach interface, and give an incremental rule for Compass to automaticallyassign IPs to all hosts on that network. You may also autofill hostnames forall servers. Currently we provide hostname autofill in Host and Switch-IP

    patterns. Click on “Fill Values” button after finishing filling in the values. Youwill be able to see in the bottom that all servers have been assigned withIPs and hostnames. Please make necessary changes to the servers and

    proceed to the next step by clicking “Next”.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    12/18

    Step 7 - PartitionThis step helps you do the partition. Compass provides LVM partitions. Youcan add/remove mount points during this step. /root mount point’s existenceis mandatory and please keep in mind that although other mount points areoptional, most operating systems require /usr and /var . So having /usr and/var in your partition is strongly recommended. You can give each mountpoint a specific percentage, and its maximum size. Once you have finished,click “Next” to proceed.

    Step 8 - SecurityIn this step, you are able to assign server and service credentials servicesand components of the target system. We have already pre-filled the valuesfor you, which you can see when you go to the last step of this wizard:review and deploy. You may also customize these credentials yourself.Again, you will get a chance to review them before deploying.

    Set OpenStack interior components credentials under the “OpenStackDatabase and Queue credentials” tab.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    13/18

    Set OpenStack authentication(including RESTful API and dashboard)credentials under the “OpenStack Keystone User Credentials” tab.

    Step 9 - Role AssignmentIn this step, you will be assigning roles to the servers. As we havediscussed in earlier steps, roles of a server are essentially describing whatthat server does. Depending on the flavor you chose, roles will beappearing in different granularities. In this instruction, we are using “SingleController, Multiple Compute” flavor, which gives us a few basic roles, suchas: Controller, Compute node, Network node and storage node. If youchose to use “multi-node” flavor, you will get more detailed roles such as:queue node, database node and so on. Here are some explanations onnodes we used for this instruction:

    Controller nodes are responsible for running the managementsoftware services needed for the OpenStack environment to function.Compute nodes run the virtual machine instances in OpenStack.Storage nodes store all the data required for the environment,including disk images in the Image Service library, and the persistentstorage volumes created by the Block Storage service.Network nodes are responsible for doing all the virtual networkingneeded for people to create public or private networks and uplinktheir virtual machines into external networks.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    14/18

    For auto assign, enter the number of each nodes that you would like toassign, then click “Assign”.

    For manually assign, drag a specific role and drop it at the desired server.

    Click “Next” when you are satisfied with role assignment.

    Step 10 - Network MappingWe are now mapping the networks to interfaces we created in “Networking”step. Different target systems have their specific networks. In thisinstruction, we are showing how to assign OpenStack networks tointerfaces. There are four types of OpenStack networks:

    Management network: this is self-explanatory. All “control plane”traffic goes through this network. For example, authentication, novaapi request, database request and queue messaging, etc.Management network doesn not require a very large bandwidth.

    Tenant network: Virtual machines created by OpenStack use thisnetwork to communicate with each other.

    Storage network: This network is used for storagedevices/components to communicate, such as failover, mirroring andload balancing. Typically storage network uses a relatively largebandwidth. So a 10g network interface is preferred if possible.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    15/18

    Public network. This network is only required to be assigned on thenetwork node. Neutron uses the public network as the network forassigning floating IPs. We should map public network onto thepromiscuous mode interface we created in “Network” step and isolatethis network. So it is important that we DO NOT overlap any othernetworks with this network. The public network has to be absolutelyisolated. Although only the network node needs to have a interfacesetup in promisc mode specifically for public network, we make thissetting as a global config to avoid ambiguity.

    Similar to role assignment, drag networks and drop them at interfaces.

    Click “Next” once you have made sure all networks are properly assignedand no network overlaps with the public network.

    Step 11 - Review and DeploymentThis is the last step before the actual deployment. You should review thispage carefully. Record the service and server credentials if needed. Onceyou have reviewed your cluster, click “Deploy” and you will be brought to adeployment status page.

    You can see there is a progress bar for each server. If the progresses stayat 0 for a long time, please refer to Appendix for guidance.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    16/18

    Step 12 - OpenStackOnce all the progress bars are showing 100%. Your cluster is ready! Nowyou may open a new tab and type in the controller node’s IP address, if youinstalled OpenStack. The dashboard will show up.

    Login to the OpenStack dashboard with the credentials you have set insecurity step. If you used our prefilled values, you may login withadmin/admin.

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    17/18

    you can start playing with openstack.

    Appendix - Frequently Asked

    QuestionsQ: After I filled in the switch information and clicked on find servers,nothing showed up. Why?

    A: They may be various reasons that cause this issue.

    Fisrt, the reason might be switch MAC address aging. you need to makesure if the servers you wish to install are still actively sending data to theiruplink. If those servers have been halted or shutdown for a while, switchesare aging their MAC-address tables periodically. You need to restart thoseservers to have them send signals to their uplinks.

    If it still does not work. You might have to head down to the lab(if physicalservers) to check the physical connections and health of those servers aswell.

    Q: Some errors occurred but I do not seem to understand, where can Isee the logs?

    A: Please login to your Compass server and go to /var/log/compass/ directory for service logs.

    Q: The installation of Compass server seems to take a long time aswell as occasionally get stuck at some point, how to resolve this?

    A: All our mirrors and package resources are based in North America. Ifyou are running this script on servers based in Asia or Europe, it is verycommon to take a long time to download packages. We will be working onbetter content delivery solutions in the next phase. Sometimes if the scriptis installing pip dependencies, it may look like the whole progress hangs, itis a known issue for pip and it will succeed eventually.

    Q: I click “deploy”, there is still no progress after waited for a while.Why?

    ass http://www.syscompass.org/install

    18 09-03-201

  • 8/19/2019 OpenStack Compass

    18/18

    A: You will need to restart all the target servers, only by restarting hostsPXE can be triggered.

    Q: I would like to delete a cluster that I create previously, but I do notfind any delete button, how can I do this?

    A: Currently there is not a cluster delete button on the web UI. But you mayfollow the steps below to delete a cluster:

    Login to your compass server.Run . ~/.virtualenvs/compass-core/bin/activate to set up thevirtual environment.

    Go to compass-core directory and run ./bin/refresh.sh to cleandatabase and restart services.

    As you can see from the image below, it will recommend you to runseveral commands to do the specifically clean. Run the commandsas needed.

    Q: I tried to deploy on Ubuntu, when I started deploy, I occured thiserror on my target machine. How to fix it?

    A: That may be caused by interfaces disorder, which means the macaddress the interface connected to does not match the mac address of thetarget machine. To avoid that problem, make sure every NIC uses the same

    adapter.

    Q: I tried to deploy on Ubuntu, after I click the “Deploy” buttom, Irestart my target machine, the progress still does not start.

    A: Entry into BIOS setup screen, check “Boot” tap, make sure the networklists on the top, then exit.

    ass http://www.syscompass.org/install