You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

This is HOWTO setup devcloud environment for CloudStack on master branch. 

1. Get DevCloud image from devcloud image. Note: it will take a while, maybe few hours to download, as the image is around 2 GB.

2. Install VirtualBox.

3. Create a "host-only" network in VirtualBox, if you don't have one.

    3.1 To create a network, go to File -> Preferences -> Network -> "Add host only network"

    3.2 To config the network created in step 3.1, right click and select "Edit host-only network", then uncheck "Enable server" in the "DHCP server" tab

4. Import devcloud image into VirtualBox.

     Note: please do NOT select "re-initialize the MAC address of all network cards"

5. Configure network for DevCloud VM:

    5.1 Settings -> network -> Adapter 1 -> Attached to, select " Host only Adaptor", 

                                                          -> Name, select the network created in step 3.1

                                                          -> Promiscuous mode, select "Allow All"

6. Start the DevCloud VM:

     After VM boots up, login into VM with username: root, password: password

     change the network configuration, edit /etc/network/interfaces with something like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto xenbr0
iface xenbr0 inet static
    gateway 192.168.56.1
    address 192.168.56.2
    netmask 255.255.255.0
    bridge_ports eth0


auto eth0
iface eth0 inet static

Network

The guest will be able to communicate with the host but will be isolated from external world (internet). If a connection with internet is required to install ISO
images, then you should consider to add a second adapter in the Virtualbox "Bridged adapter".

    Then reboot DevCloud

7. Checkout the latest master code, then start management server on your laptop:

    mvn -P developer clean install

    mvn -P developer -pl developer,tools/devcloud -Ddeploydb

    mvn -pl :cloud-client-ui jetty:run

     Then wait until management server is up

NB:

  1. Developing on Windows machine: MUST install following dependencies: python, mysql connector for python, Bash, tar (using cygwin or msysgit).
  2. There are some bugs sometimes appear on random Windows machine such as:
  • com.cloud.api.doc.ApiXmlDocWriter ClassNotFound: modify build-apidoc.sh and edit line
     java -cp $CP com.cloud.api.doc.ApiXmlDocWriter -d "$DISTDIR" $* 
    to:
     java -cp .$CP com.cloud.api.doc.ApiXmlDocWriter -d "$DISTDIR" $* 
  • Devcloud node always show Alert state: checkout that git global config do not set autocrlf to true.
  1. Use '-pl' as in 'pappa', 'lima', and not '-p1' as in 'pappa', one'.
  2. Make sure you're using Maven3 and not any of the previous versions. Instructions to install Maven 3 on Ubuntu can be found here http://superuser.com/a/298063
  3. If Jetty is not present by default, you can include the following lines in pom.xml under <plugins> to instruct maven to obtain it:
       <plugin>
           <groupId>org.mortbay.jetty</groupId>
           <artifactId>maven-jetty-plugin</artifactId>
           <version>6.1.12</version>
       </plugin>
    
  4. You may need to set your mysql database password to NULL.  E.g. http://stackoverflow.com/questions/3032054/how-to-remove-mysql-root-password. If this does not work, try providing a non-null password for the root user and provide this password by creating the file incubator-cloudstack/utils/db.properties.override and updating db.root.password

8. Deploy DevCloud (make sure python-mysql connector is installed and that the management server is running)

 mvn -P developer -pl tools/devcloud -Ddeploysvr

The above will deploy a zone with settings defined in tools/devcloud/devcloud.cfg which sets some global settings and will take some time. After this, you should restart management server and destroy any system vms which may have started for the global settings to take effect.

  • No labels