Friday, July 29, 2011

Implementing Cloud Computing on your average Desktop PC (Part 2/3)

After OS installation - on Integration and Troubleshooting
After the OS is installed on both Cloud Controller and Node Controller systems, the Cloud Controller’s web interface should be accessible through https://:8443 using the default credentials - admin/admin.
While I thought my private cloud was ready to go, it turned I still had to fix and tune a couple of things. The following were the errors I encountered along with their resolutions I gathered along the way:

1. “Store” tab showed “failed to connect to local store proxy” error:
Referencing the link, do a “apt-get install python-image-store-proxy” to resolve the problem.
2. Verify (and fix) the “/etc/eucalyptus/eucalyptus.conf” file
On Cloud Controller, ensure the private and public interfaces are set correctly (in my case, I set them as the two different NICs to avoid some random remote access issues). Furthermore, set NODES=”” to resolve the 0 free/max problem discussed later.
3. Under “Configuration” tab, remember to set the IP address for Cloud Controller, Walrus Host and Cluster Controller, as well as save the VM Types.
With my setup, I set the system’s public IP address to be Cloud Host, Walrus Host; whereas for the Cluster Controller I used private address. Also, I saved the default VM Types.
4. Credentials.zip
4.1 “eucarc” script gives “No Route to Host” error
“eucarc” script is a part of credentials.zip file, which is to be extracted into ~/.euca/ directory on the Cloud Controller.
After Walrus, Cluster Controller and VM Types registration, download credentials onto Cloud Controller (as Cloud Client) and run the "eucarc" script.
The “eucarc” script may give a "No Route to Host" error, this link suggested restarting the Cloud Controller to resolve this issue (and I can confirm it works).

4.2 “EC2_ACCESS_KEY environment variable must be set”
While issue “euca_describe-availability-zones verbose” command (euca2ools), it gives an error as follows:
root@ubuntu-CloudController:~# euca-describe-availability-zones
EC2_ACCESS_KEY environment variable must be set.
Connection failed
The way I resolved this was to download the credentials again, and re-run the “eucarc” script. Furthermore, in /root/.bashrc, add the line to avoid downloading the credentials every time the cloud controller restarts.
[ -r ~/.euca/eucarc ] && . ~/.euca/eucarc
(I read this on one of the forums but forgot to capture the link)
4.3 Node Controller (?) Without fully understand the purpose of the "eucarc" script, I also scp and ran it on the Node Controller having encountered the 0 free/max cpu issue the second time.
5. “euca-describe-availability-zones verbose” should describe the environment (resources availabile on the Node Controller for running an instance). If the “free/max” fields are both 0, then something has not been registered properly.
By removing "NODES" config under eucalyptus.conf, and then deregister BOTH clusters and Node, and then register the cluster and then node again, it solved the 000 free/max CPU problem, referencing this link.
root@ubuntu-CloudController:~/.euca# euca_conf --deregister-nodes 192.168.20.2
SUCCESS: removed node '192.168.20.2' from '//etc/eucalyptus/eucalyptus.local.conf'
root@ubuntu-CloudController:~/.euca# euca_conf --list-clusters
registered clusters:
HomeCluster 192.168.10.153
root@ubuntu-CloudController:~/.euca# euca_conf --deregister-cluster HomeCluster
SUCCESS: cluster 'HomeCluster' successfully deregistered.
root@ubuntu-CloudController:~/.euca# euca_conf --register-cluster HomeCluster 192.168.20.1
Trying rsync to sync keys with "192.168.20.1"...The authenticity of host '192.168.20.1 (192.168.20.1)' can't be established.
ECDSA key fingerprint is 2a:29:27:ce:a1:03:a9:5e:c1:e3:52:9e:62:89:de:23.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.20.1' (ECDSA) to the list of known hosts.
done.
SUCCESS: new cluster 'HomeCluster' on host '192.168.20.1' successfully registered.
root@ubuntu-CloudController:~/.euca# euca_conf --list-clusters
registered clusters:
HomeCluster 192.168.20.1
root@ubuntu-CloudController:~/.euca# euca_conf --register-nodes 192.168.20.2
INFO: We expect all nodes to have eucalyptus installed in //var/lib/eucalyptus/keys for key synchronization.
Trying rsync to sync keys with "192.168.20.2"...done.
root@ubuntu-CloudController:~/.euca# euca_conf --list-nodes
registered nodes:
192.168.20.2 HomeCluster
root@ubuntu-CloudController:~/.euca# euca-describe-availability-zones
AVAILABILITYZONE HomeCluster 192.168.20.1
root@ubuntu-CloudController:~/.euca# euca-describe-availability-zones verbose
AVAILABILITYZONE HomeCluster 192.168.20.1
AVAILABILITYZONE |- vm types free / max cpu ram disk
AVAILABILITYZONE |- m1.small 0002 / 0002 1 192 2
AVAILABILITYZONE |- c1.medium 0002 / 0002 1 256 5
AVAILABILITYZONE |- m1.large 0001 / 0001 2 512 10
AVAILABILITYZONE |- m1.xlarge 0001 / 0001 2 1024 20
AVAILABILITYZONE |- c1.xlarge 0000 / 0000 4 2048 20

6. Configure bridge on CloudController in response to WARN message in /var/log/eucalyptus/cc.log, referencing recommendations from this link.

Congratulations if you have reached this far into this post. At this stage, you should have a working cloud platform, allowing you to search and install images from "Store" tab.
The next blog will be about Hybridfox interface, launching an instance and accessing it through ssh.

No comments:

Post a Comment