Running CloudRouter OSv OpenDaylight Image on Google Cloud

Here's how you can run the CloudRouter OSv OpenDaylight controller on Google Cloud..

 

Step1 : Download the CloudRouter OSv Opendaylight image from repo.cloudrouter.org 


wget https://repo.cloudrouter.org/repo/beta/images/CloudRouter-Beta-OSv-OpenDaylight-20150320.qemu.xz

 


Step2 : Uncompress the compressed image

 

unxz CloudRouter-Beta-OSv-OpenDaylight-20150320.qemu.xz

 

Step3 : Convert to raw image

 

qemu-img convert -O raw ./CloudRouter-Beta-OSv-OpenDaylight-20150320.qemu ./CloudRouter-Beta-OSv-OpenDaylight-20150320.raw


Step4 : Rename the file to disk.raw



mv CloudRouter-Beta-OSv-OpenDaylight-20150320.raw disk.raw


Step 5: Create a tarball to upload to google cloud


tar -Sczf CloudRouter-Beta-OSv-ODL-20150320.tar.gz disk.raw


Step 6 : Upload the image to google cloud


gsutil cp CloudRouter-Beta-OSv-ODL-20150320.tar.gz gs://<BUCKET_NAME>/CloudRouter-Beta-OSv-ODL-20150320.tar.gz


Step 7: Add the Image to be available in your google cloud project


gcutil addimage cloudrouter-beta-osv-odl-20150320 gs://<BUCKET_NAME>/CloudRouter-Beta-OSv-ODL-20150320.tar.gz


Step 8: Create a google cloud instance with the uploaded image

gcutil addinstance --image=cloudrouter-beta-osv-odl-20150320  --machine_type=f1-micro  --zone=us-central1-a  $instance_name


Step9 : SSH to the Karaf port to start configuring OpenDaylight

 

$ ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no -p 8101 karaf@<Google-Cloud-Instance-IP-ADDR> ( default password is 'karaf' )
Authenticated with partial success.
Password authentication
Password:

________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>
opendaylight-user@root>
opendaylight-user@root>
opendaylight-user@root>feature:list -i
Name | Version | Installed | Repository | Description
------------------------------------------------------------------------------------------------------
standard | 3.0.1 | x | standard-3.0.1 | Karaf standard feature
config | 3.0.1 | x | standard-3.0.1 | Provide OSGi ConfigAdmin support
package | 3.0.1 | x | standard-3.0.1 | Package commands and mbeans
kar | 3.0.1 | x | standard-3.0.1 | Provide KAR (KARaf archive) support
ssh | 3.0.1 | x | standard-3.0.1 | Provide a SSHd server on Karaf
management | 3.0.1 | x | standard-3.0.1 | Provide a JMX MBeanServer and a set of MBeans in K
opendaylight-user@root>

 

Step 10: Voila! We have CloudRouter Opendaylight OSv image running on google cloud.