We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question

Can i host fiware image in premises or can i host it on any other cloud as aws etc.

asked 2016-12-03 06:57:13 +0200

Ashish Singal gravatar image

Urgent, I cannot host it on cloud and my requirements are such that i want to host in premises. can i do it usig fiware, please reply.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-12-07 10:57:33 +0200

jicg gravatar image

updated 2016-12-07 11:44:06 +0200

The answer is yes --- You can dowload your images to your own premises and start any instance using some other hipervisors (although this is another thing). You should be able to host your images in any other cloud although you should ask your cloud administrator about the facilities they give you in order tor upload your own images.

Imagine you want your VM running in your own copy of Virtual Box. Let's imagine the name of your running instance is "mysqlhost".

Before you begin...

Start by installing an Openstack Client in your own Python Virtual environment (let's do this using bash):

$ virtualenv  osdemo
$ source osdemo/bin/activate
(osdemo)$ pip install python-openstackclient

Once you have this done, you can set a few configuration variables in order to communicate with your account:

export OS_USERNAME=yourcloudaccout@wherever.is
echo Password:
export OS_TENANT_NAME="yourtenantname"
export OS_REGION_NAME="Spain2"  ## Or whatever region you are using.
export OS_AUTH_URL=http://cloud.lab.fiware.org:4730/v2.0

You can get your OSUSERNAME, your OSTENANTNAME and your OSREGIONNAME from the Cloud Portal (there's an "info" button which opens a popup window with a "downrload openrc file" button). The value for OSAUTHURL is the one shown beforn and for OSPASSWORD you should know ;)

Now we are ready to proceed:

Take a Snapshot.

The name of our running instance was "mysqlhost" and the name for my snapshot will be "snp-mysql". This step is slow because it is internally compound by a large set of procedures. The best way to do this is stoping the VM before running this step.

<source>(osdemo)$ nova image-create mysqlhost snp-mysql

One your snapshot is active (you can check this way):

(osdemo)$ openstack image show snp-mysql
| checksum         | d149c222fc7e0cd4941605c319d34fc8
| disk_format      | qcow2 
| id               | 21748c3e-85f0-449b-8f4d-6e78f1d46617
| name             | snp-mysql
| status           | active

Download the Snapshot and use it....

Now you can download your image (a file with a size of a few GBs):

(osdemo)$ openstack image save snp-mysql > ~/VirtualBox\ VMs/snp-mysql.qcow2
One last step is converting you qcow2 image to whatever format you want to use --- As an example, let's show how to convert to VDI (virtual box image)

 $ qemu-img convert -f qcow2   ~/VirtualBox\ VMs/snp-mysql.qcow2 -O vdi ~/VirtualBox\ VMs/snp-mysql.vdi

Now you can start one VM from your image using VirtualBox (you set your dist to the one you converted), you can use KVM (You can use the qcow2 image you downloaded)... Whatever

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-12-03 06:57:13 +0200

Seen: 2,449 times

Last updated: Dec 07 '16