Deploy Apache CloudStack with cldstk-deploy, now on Github.



CloudStack Deploy is a utility for making Apache CloudStack and KVM installations quick, easy and painless. Meant to be reusable so you can deploy Apache CloudStack more than once after you’ve downloaded the RPMS and systemtemplates locally with cldstk-deploy.

Features

  • can pre download Apache CloudStack RPMS (version 4.2 & 4.3)
  • can pre download KVM system template
  • runs web server to be used as local RPM and systemtemplate repository
  • can install and setup cloudstack-management servers (One or many)
  • can install and setup mysql database servers (Primary and Repica)
  • can install and setup cloudstack-agent KVM hosts
  • can preseed KVM system template
  • can mix options

Requirements

  • CentOS 6.4 or above
  • Systems must have internet connectivity
  • Host resolution must be working for the systems that runs this process

Check out the video on youtube here.

Getting Started

Setting up the environment

  1. Download cldstk-deploy fromGithub.
    yum install git -y
    git clone https://github.com/thehyperadvisor/cldstk-deploy.git
  2. Setup cldstk-deploy using the “setup all” option. This prepares the environment and installs all the required packages for cldstk-deploy (nodejs and ansible).
    python cldstk-deploy.py setup all
  3. Download the Apache CloudstackRPMS andSystemtemplates using the “get rpmversion=” and “get systemtemplate=” options.
    python cldstk-deploy.py get rpmversion=4.3
  4. (OPTIONAL) BuildRPMS from source. ONLY 4.3 for now. ONLY IF YOU DO NOT DOWNLOADRPMS.
    python build–4.3.0-rpms.py

    Takes roughly 10 minutes to build and installs additional packages.

  5. Download KVM system template. Version 4.2 or 4.3 works.
    python cldstk-deploy.py get systemtemplate=4.3

Usage Instructions

RPM packages and system templates must be in downloaded first when NOT using the “Internet” installation type.

  1. Browse the cldstk-deploy directory then run the command below.
    python cldstk-deploy.py

    This will start asking questions from the command prompt.

  2. Next all you have to do is answer the questions. Example shown below.
    [root@ansible cldstk-deploy]# python cldstk-deploy.py
    Cloudstack Deployment: Answer the questions below....
    Install Primary Database Server?[Y/n]: y
    Db Server[dns/ip]: cldstkdbsrv01
    Configure Database Replica?[Y/n]: y
    DB Replica Server[dns/ip]: cldstkdbsrv02
    Install Primary Management Server?[Y/n]: y
    Server[dns/ip]: cldstkwebsrv01
    Install additional Management servers?[Y/n]: y
    Comma separated list: cldstkwebsrv02,cldstkwebsrv03
    Install KVM Hosts?[Y/n]: y
    Comma separated list: cldstkkvm01,cldstkkvm02
    Install System Templates?[Y/n]: y
    NFS Server[dns/ip]: labnas01
    NFS Path[/nfsdirpath]: /nfs/secondary
    Change install type to "Internet"?[Y/n]: n
    Change install version to "4.2"?[Y/n]: n
    Add ssh rsa keys to ~/.ssh/known_hosts?[Y/n]: y
    ansible hosts file successfully writing to disk.....
    vars_file successfully writing to disk.....
    Start installation now?[Y/n]: y
    SSH password:

 

After you enter your password it’s off to the races. If everything goes as planned you’ll have all your Apache CloudStack components up and running in no time.

For “All-In-One” installation, you can use the same system name for “Primary Management Server”, “Primary DB Server” and “KVM Host”.

7 Comments

Add yours
  1. Abe Hoffman

    CentOS 6.5 64-Bit

    After saying Y to store the rsa key:

    Add ssh rsa keys to ~/.ssh/known_hosts?[Y/n]: Y
    Traceback (most recent call last):
    File “cldstk-deploy.py”, line 424, in
    main()
    File “cldstk-deploy.py”, line 269, in main
    system_template = ‘ttp://download.cloud.com/templates/4.3/systemvm64template-2020-01-14-master-kvm.qcow2.bz2’ % eth_ip
    TypeError: not all arguments converted during string formatting

    Any ideas?

    • Antone Heyward

      Yes. You found a typo in the code for the systemtemplate url. It’s missing a “h” in “http://”. You can edit the cldstk-deploy.py file on this line to fix. I will fix it in master branch on github. Thx.

    • Antone Heyward

      It’s fixed on github now. I tend to do more testing with the “Local” installation type because it’s much faster. Thx again for reporting the issue and for using the cldstk-deploy tool.

  2. Carlos

    Hi Antone,

    I’m writing from Portugal,

    I’m new to CloudStack, and is the first time that I’m going to use this technology.
    Can you please advise me what i need to have this work?
    I see your video im youtube, and as far i can see, I’m going to need 2 or 3 servers. What do i need to install in these servers, and how i do this. Is there any step by step manual to deploy this.

    Best Regards,

    Carlos

    • Antone Heyward

      Carlos you only need a single system for cldstk-deploy but you can have as many cloudstack servers as you’d like.

      If you only need to test and play with cloudstack you can install all the components on a single server as I showed in the video.

      I do not recommend installing cloudstack on the same system as cldstk-deploy but some have done it and it would work.

  3. Carlos

    Hi Antone.

    Thanks for your reply.

    I have a small environment of 5 servers where i have VMware installed, and the vCenter 5.1 to control all the 5.
    I still have 4 servers for backup where i can deploy the cloudstack and the cldstk-deploy. How can i do this??
    I dont know how to do this. do you have or is there any “How to do” manual to start building cloudstack?

    Best Regards,

    Carlos

Comments are closed.