Nov 10 2015

How to create a private basic cloud infrastructure

BASIC PRIVATE CLOUD IAAS (APACHE CLOUDSTACK)

Main benefits:
– Quick operational basic private cloud infrastructure (suitable for learning, personal use or small business)
– Full control over your Cloud infrastructure
– No lock in

Prerequisites:
a dedicated server with
– at least 4 cpus
– 8G of memory or more
– more than 200G of disk space
– Virtualization support enabled
– A fresh Centos 7.1 linux OS install (minimal install is enought – https://www.centos.org/download/)
– Internet connection with a public IP address

Install:
yum install git -y
git clone https://github.com/big3v/PrivateBasicCloudIAAS.git
cd PrivateBasicCloudIAAS
cd PrivateBasicCloudIAAS
python setup.py
then follow instructions
Connect with VPN (Select L2TP/IPSec VPN Type and enter your preshared key)

CloudStack Management UI
http://192.168.122.10:8080/client/
User: admin
Default password: big3v.com

13 Comments

  • David February 19, 2017 at 3:10 pm

    I have followed the above a few times and hit the same error each run – python: can’t open file ‘ez_setup.py’: [Errno 2] No such file or directory

    so your script is missing at least one item during the download phase.

    Reply
    • favicon08
      yassine February 19, 2017 at 4:52 pm

      Hi David,
      could you please indicate at which point of the procedure you are hitting this error?
      There is no ez_setup.py file involved in the script, the following link might help:
      https://pypi.python.org/pypi/ez_setup
      Y.

      Reply
      • David February 22, 2017 at 3:32 am

        I just add my comments through your contact page – however here’s the jist of it: There are a number of issues with the installation and I have gotten through all but one of these: First ez_setup.py does not exist so I downloaded it from git. Once I got a flawless run of the script, I found the firewall does not allow for VPN access until I opened up ports 500 and 4500 on the public interface of my linux box. Then, once the VPN’s DHCP assigned me an IP address, the linux server acts as a router so it bypasses the 192.168.122.10 address and sends the request out through to the internet. The target address can be pinged from the server itself, but not from the Windows box over the VPN tunnel. I need help with this last issue on getting the windows box (assigned 192.168.30.11) to be able to send/receive to the desired url (https://192.168.122.10:8080/client)

        Reply
        • David February 23, 2017 at 1:50 am

          Yassine, is there any hint you can give me as to how to get the VM’s IP to be reachable through the DEFAULT hub? I have tried a number of route changes, VPN configurations, Virtual DHCP reconfigurations, and I have not been able to get the two to connect. My workstation VPN’s in and gets 192.168.30.10, gets onto the DEFAULT hub, yet all attempts either fail or go through to the internet instead of finding the IP on the hub. Thanks

          Reply
          • favicon08
            yassine February 23, 2017 at 10:56 am

            Hi David,
            this should be working out of the box, but if you’ve made some changes to your network configuration you might need to double check your Guest Network in the CloudStack Manager accordingly and make sure that appropriate rules (ACL) are in place to allow reaching your VM.
            Another approach would be to install a softether vpn client on your VM and connect it to the DEFAULT Hub (http://softether.net/).

  • David February 23, 2017 at 3:31 pm

    Thanks, I have tried that as well. I have the client and admin loaded on my workstation and can work with the SoftEther VPN remotely, however nothing I have tried allows me to get to the IP address of the VMs on the Linux server. For the record I think your script is great – however it doesn’t work out of the box without some help. As said previously I was able to clear these, but here are the errors I received when following your video step by step:

    – Processing pip-9.0.1.tar.gz
    Running pip-9.0.1/setup.py -q bdist_egg –dist-dir /tmp/easy_install- 3P2jdN/pip-9.0.1/egg-dist-tmp-2OugCv
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: ‘python_requires’
    – Running setup.py install for cryptography … error
    Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;__file__=’/tmp/pip-build-dZVbx8/cryptography/setup.py’;f=getattr (tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-smv2Nz-record/install-record.txt –single-version-externally- managed –compile:
    – No package ‘libffi.pc’ found
    – c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
    – Command “/usr/bin/python -u -c “import setuptools, tokenize;__file__=’/tmp/pip-build-dZVbx8/cryptography/setup.py’;f=getattr (tokenize, ‘open’, open)(__file__);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record /tmp/pip-smv2Nz-record/install-record.txt –single-version-externally- managed –compile” failed with error code 1 in /tmp/pip-build- dZVbx8/cryptography/

    David

    Reply
    • David February 23, 2017 at 3:40 pm

      I just did something that got my connection working – however I am asking if this is a bad thing from your perspective. I changed the virtual DHCP to offer up 192.168.122.50 – 192.168.122.200 instead of offering up 192.168.30.x IP addresses. With this change, the VPN clients are on the same IP scheme. Is this a bad configuration for testing purposes?

      Also, I really want to thank you for the script and your help!

      Reply
      • favicon08
        yassine March 8, 2017 at 10:29 pm

        Should be fine, depending on your network configuration.
        Y.

        Reply
    • favicon08
      yassine March 8, 2017 at 10:26 pm

      Hi David,
      sorry for the late answer, busy times …
      It is supposed to work out of the box as long as you start from a fresh centos minimal install.
      I’ve tested the script many times and never came across this error.
      It seems to be related to your python package, maybe not the right version.
      Y.

      Reply
  • David February 23, 2017 at 7:14 pm

    What is the root password for 192.168.122.10 and 192.168.122.20?

    Reply
    • David March 4, 2017 at 7:43 pm

      Yassine – I just re built this from scratch and am still having an issue where I need to get into one of the servers your script sets up – can you please tell me how to get into them? In this case, I am unable to upload an ISO image so I need to get into where the image is so I can see why there is a problem.
      Thank you

      Reply
      • David March 4, 2017 at 9:45 pm

        never mind – stupidly forgot I could read the script

        Reply
    • favicon08
      yassine March 8, 2017 at 10:30 pm

      Fa26Lio5 for both.
      Y.

      Reply

Leave a Reply

Your email address will not be published.