Gangmax Blog

Use Micro Cloud Foundry

Here’s some notes about using the micro cloud foundry. Refer here.

  1. First you need to get the image package of the Micro Cloud Foundry. Download here.

  2. You need install “VMWare Player“ to run the image file.

    During the installation process, if an error told you that it needs “x64” environment and wouldn’t proceed, you can try this solution: restart your computer and go to BIOS, go to “Device->CPU” configuration(or something like that), find an option “Virtulization” and make it “Enabled”. Then restart your computer and see if it works. In my case it does.

    After you install the VMWare Player, when the first time you run it, you may meet an error “Network virtualization” failure which stops you(I got this issue on my Ubuntu 12.04 and VMWare Player 4.0.3). The solution of this issue is that:

    • Download the patch file and extract it;

    • Change the “patch-modules_3.2.0.sh” file content: replace “plreqver=4.0.2” to “plreqver=4.0.3”, if you’re using the “4.0.3” version of the VMWare Player;

    • Run the “sudo ./patch-modules_3.2.0.sh” script to patch your VMWare Player. When it finishes, start the VMWare Player, it should work now.

  3. Login Cloud Foundry and create a domain name, remember the token of this domain name, which will be used in the next step.

  4. Load the micro Cloud Foundry image with the VMWare Player, you may be asked the following information:

    • “vcap” user password

    • “Network IP address”: DHCP/Static IP

    • Your domain name token

      After everything is OK, the VM starts.

  5. Use “vmc” to test the running micro Cloud Foundry.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    $ vmc target api.xxxx.cloudfoundry.me
    Successfully targeted to [http://api.xxxx.cloudfoundry.me]

    $ vmc register
    Email: any_email@address.com
    Password: **********
    Verify Password: **********
    Creating New User: OK
    Attempting login to [http://api.xxxx.cloudfoundry.me]
    Successfully logged into [http://api.xxxx.cloudfoundry.me]

    $ vmc runtimes

    +--------+-------------+-----------+
    | Name | Description | Version |
    +--------+-------------+-----------+
    | java | Java 6 | 1.6 |
    | ruby18 | Ruby 1.8 | 1.8.7 |
    | ruby19 | Ruby 1.9 | 1.9.2p180 |
    | node | Node.js | 0.4.12 |
    | node06 | Node.js | 0.6.8 |
    +--------+-------------+-----------+

    $ vmc frameworks

    +----------+
    | Name |
    +----------+
    | spring |
    | java_web |
    | sinatra |
    | grails |
    | node |
    | lift |
    | rails3 |
    +----------+

    Then you can deploy your app to it with “vmc” like what you can do to the public Cloud Foundry.

  6. You can also use “ssh”(either with the IP or with the domain name) to login the vm instance with the “vcap” account, the password is what you set when starts the VM in the VMWare Player.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    $ ssh vcap@xxxx.cloudfoundry.me
    The authenticity of host 'xxxx.cloudfoundry.me (172.16.217.129)' can't be established.
    RSA key fingerprint is ae:bd:5e:f6:5f:72:4f:a0:9a:51:c6:4e:d0:8c:5d:7e.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'xxxx.cloudfoundry.me' (RSA) to the list of known hosts.
    vcap@xxxx.cloudfoundry.me's password:
    __ ___ __ _____ ____ _ _ __ ___
    \ \ / / '_ ` _ \ \ /\ / / _` | '__/ _ \
    \ V /| | | | | \ V V / (_| | | | __/
    \_/ |_| |_| |_|\_/\_/ \__,_|_| \___|

    Welcome to Micro Cloud Foundry (TM)

    For installation and setup documentation, go to:
    http://support.cloudfoundry.com/entries/20316811

    Default configuration:
    VM: 1 GB RAM / 16 GB disk
    MySQL: 2GB storage, max 256MB storage per instance
    Postgres: 2GB storage, max 256MB storage per instance
    MongoDB: 256MB per instance
    Redis: 256MB per instance

    Micro Cloud Foundry component licenses are available in:
    /var/vcap/micro/LICENSES
    Micro Cloud Foundry SBTA is available in:
    /var/vcap/micro/SBTA

    Last login: Thu May 10 05:34:59 2012 from 172.16.217.1
    vcap@micro:~$ uname -a
    Linux micro 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
    vcap@micro:~$ cat /etc/issue
    Ubuntu 10.04.4 LTS \n \l

    That’s it.

Comments