You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Helge Waastad <he...@waastad.org> on 2016/09/11 10:36:08 UTC

configdrive in ACS

Hi,
Im testing out RancherOS in ACS and have a couple of issues.

First, it seems that RancherOS does not support cloudstack datasource for meta/userdata but that I need to take with Rancher guys.

But, in openstack I can always use configdrive to get userdata to my vm.

Is it possible to use configdrive in acs? (i have'nt had any luck yet)

Br hw




Sendt fra Galaxy Tab

Re: configdrive in ACS

Posted by Stephan Seitz <s....@secretresearchfacility.com>.
Hi Jayapal,

out of curiosity, i just tried that. It just shows

"Unable to deploy VM as template 471 is password enabled, but there is
no support for UserData service in the default network 232"

cheers,

- Stephan

Am Donnerstag, den 15.09.2016, 14:48 +0530 schrieb Jayapal Reddy:
> Hi,
> 
> Cloudstack has config drive support for shared network without
> service.
> 
> 1. Create a shared network offering without any service (In advanced
> zone)
> 2. Create a shared network using above offering.
> 3. Deploy  VM in this network. log in to the VM and see the device by
> label
> (config). You will find the config drive.
> 
> Thanks,
> Jayapal
> 
> On Sun, Sep 11, 2016 at 4:06 PM, Helge Waastad <he...@waastad.org>
> wrote:
> 
> > 
> > Hi,
> > Im testing out RancherOS in ACS and have a couple of issues.
> > 
> > First, it seems that RancherOS does not support cloudstack
> > datasource for
> > meta/userdata but that I need to take with Rancher guys.
> > 
> > But, in openstack I can always use configdrive to get userdata to
> > my vm.
> > 
> > Is it possible to use configdrive in acs? (i have'nt had any luck
> > yet)
> > 
> > Br hw
> > 
> > 
> > 
> > 
> > Sendt fra Galaxy Tab

Re: configdrive in ACS

Posted by Jayapal Reddy <ja...@gmail.com>.
Hi,

Cloudstack has config drive support for shared network without service.

1. Create a shared network offering without any service (In advanced zone)
2. Create a shared network using above offering.
3. Deploy  VM in this network. log in to the VM and see the device by label
(config). You will find the config drive.

Thanks,
Jayapal

On Sun, Sep 11, 2016 at 4:06 PM, Helge Waastad <he...@waastad.org> wrote:

> Hi,
> Im testing out RancherOS in ACS and have a couple of issues.
>
> First, it seems that RancherOS does not support cloudstack datasource for
> meta/userdata but that I need to take with Rancher guys.
>
> But, in openstack I can always use configdrive to get userdata to my vm.
>
> Is it possible to use configdrive in acs? (i have'nt had any luck yet)
>
> Br hw
>
>
>
>
> Sendt fra Galaxy Tab

Re: configdrive in ACS

Posted by ilya <il...@gmail.com>.
I guess a known fact, but most people behind RacherOS were original
authors of CloudStack. They should have no issues integrating with
CloudStack - assuming you are Rancher customer - you can ask them to
extend support for it.



On 9/12/16 4:38 AM, Helge Waastad wrote:
> Hi,
> and thanks for answering.
> 
> Yeah, I've read the docs and I've seen the cloudstack cloud-init
> implementation in ubuntu cloud-image
> 
> So since configdrive is not supported I think I need to follow your
> advice and rather make a script fetching needed information from
> cloudstack instead and then start services needed in shell.
> 
> thx,
> 
> hw
> 
> 
> s�., 11.09.2016 kl. 15.30 +0000, skrev Sergey Levitskiy:
>> ACS uses a different system than configdrive. Userdata and metadata
>> is saved on a vrouter and can be queried from the instance with basic
>> HTTP call. It is very similar to AWS.
>> To save userdata you would use deployVirtualMachine or
>> updateVirtualMachine call
>> Use this guide for details how format encode it:
>> http://docs.cloudstack.apache.org/projects/cloudstack-administration/
>> en/4.8/virtual_machines/user-data.html
>>
>> Here it is an example how you would get VM ID and some random
>> property from metadata and userdata assuming userdata has
>> propertyname:\u201dpropertyvalue\u201d style tag inside
>>
>> if [[ $OS == "RHEL" || $OS == "CentOS" ]]; then
>>   DHCPBASE="/var/lib/dhclient/dhclient-*.lease"
>> elif [ $OS == "Ubuntu" ]; then
>>   DHCPBASE="/var/lib/dhcp/dhclient.*.leases"
>> fi
>>
>> DHCPSERVER=`grep dhcp-server-identifier $DHCPBASE |tail -1|awk
>> '{print $3}'|sed 's/;//'`
>> IPADDRESS=`curl -s http://$DHCPSERVER/latest/local-ipv4`
>> PROVIDERID=`curl -s http://$DHCPSERVER/latest/vm-id|sed '/^i-.*/s/i-
>> [0-9]*-//'|sed 's/-VM$//'|sed '/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-
>> f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/s/-[0-9a-f]\{4\}-[0-9a-f]\{4\}-
>> [0-9a-f]\{4\}-[0-9a-f]\{12\}$//'`
>>
>> PROPERTYVALUE=`curl -s http://$DHCPSERVER/latest/user-data|grep
>> propertyname|cut -d":" -f2|cut -d'"' -f2`
>>
>>
>>
>>
>>
>>
>> On 9/11/16, 3:36 AM, "Helge Waastad" <he...@waastad.org> wrote:
>>
>>     Hi,
>>     Im testing out RancherOS in ACS and have a couple of issues.
>>     
>>     First, it seems that RancherOS does not support cloudstack
>> datasource for meta/userdata but that I need to take with Rancher
>> guys.
>>     
>>     But, in openstack I can always use configdrive to get userdata to
>> my vm.
>>     
>>     Is it possible to use configdrive in acs? (i have'nt had any luck
>> yet)
>>     
>>     Br hw
>>     
>>     
>>     
>>     
>>     Sendt fra Galaxy Tab
>>
>>
>>

Re: configdrive in ACS

Posted by Helge Waastad <he...@waastad.org>.
Hi,
and thanks for answering.

Yeah, I've read the docs and I've seen the cloudstack cloud-init
implementation in ubuntu cloud-image

So since configdrive is not supported I think I need to follow your
advice and rather make a script fetching needed information from
cloudstack instead and then start services needed in shell.

thx,

hw


s�., 11.09.2016 kl. 15.30 +0000, skrev Sergey Levitskiy:
> ACS uses a different system than configdrive. Userdata and metadata
> is saved on a vrouter and can be queried from the instance with basic
> HTTP call. It is very similar to AWS.
> To save userdata you would use deployVirtualMachine or
> updateVirtualMachine call
> Use this guide for details how format encode it:
> http://docs.cloudstack.apache.org/projects/cloudstack-administration/
> en/4.8/virtual_machines/user-data.html
> 
> Here it is an example how you would get VM ID and some random
> property from metadata and userdata assuming userdata has
> propertyname:\u201dpropertyvalue\u201d style tag inside
> 
> if [[ $OS == "RHEL" || $OS == "CentOS" ]]; then
> � DHCPBASE="/var/lib/dhclient/dhclient-*.lease"
> elif [ $OS == "Ubuntu" ]; then
> � DHCPBASE="/var/lib/dhcp/dhclient.*.leases"
> fi
> 
> DHCPSERVER=`grep dhcp-server-identifier $DHCPBASE |tail -1|awk
> '{print $3}'|sed 's/;//'`
> IPADDRESS=`curl -s http://$DHCPSERVER/latest/local-ipv4`
> PROVIDERID=`curl -s http://$DHCPSERVER/latest/vm-id|sed '/^i-.*/s/i-
> [0-9]*-//'|sed 's/-VM$//'|sed '/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-
> f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/s/-[0-9a-f]\{4\}-[0-9a-f]\{4\}-
> [0-9a-f]\{4\}-[0-9a-f]\{12\}$//'`
> 
> PROPERTYVALUE=`curl -s http://$DHCPSERVER/latest/user-data|grep
> propertyname|cut -d":" -f2|cut -d'"' -f2`
> 
> 
> 
> 
> 
> 
> On 9/11/16, 3:36 AM, "Helge Waastad" <he...@waastad.org> wrote:
> 
> ����Hi,
> ����Im testing out RancherOS in ACS and have a couple of issues.
> ����
> ����First, it seems that RancherOS does not support cloudstack
> datasource for meta/userdata but that I need to take with Rancher
> guys.
> ����
> ����But, in openstack I can always use configdrive to get userdata to
> my vm.
> ����
> ����Is it possible to use configdrive in acs? (i have'nt had any luck
> yet)
> ����
> ����Br hw
> ����
> ����
> ����
> ����
> ����Sendt fra Galaxy Tab
> 
> 
> 

Re: configdrive in ACS

Posted by Sergey Levitskiy <Se...@autodesk.com>.
ACS uses a different system than configdrive. Userdata and metadata is saved on a vrouter and can be queried from the instance with basic HTTP call. It is very similar to AWS.
To save userdata you would use deployVirtualMachine or updateVirtualMachine call
Use this guide for details how format encode it:
http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/4.8/virtual_machines/user-data.html

Here it is an example how you would get VM ID and some random property from metadata and userdata assuming userdata has propertyname:”propertyvalue” style tag inside

if [[ $OS == "RHEL" || $OS == "CentOS" ]]; then
  DHCPBASE="/var/lib/dhclient/dhclient-*.lease"
elif [ $OS == "Ubuntu" ]; then
  DHCPBASE="/var/lib/dhcp/dhclient.*.leases"
fi

DHCPSERVER=`grep dhcp-server-identifier $DHCPBASE |tail -1|awk '{print $3}'|sed 's/;//'`
IPADDRESS=`curl -s http://$DHCPSERVER/latest/local-ipv4`
PROVIDERID=`curl -s http://$DHCPSERVER/latest/vm-id|sed '/^i-.*/s/i-[0-9]*-//'|sed 's/-VM$//'|sed '/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/s/-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}$//'`

PROPERTYVALUE=`curl -s http://$DHCPSERVER/latest/user-data|grep propertyname|cut -d":" -f2|cut -d'"' -f2`






On 9/11/16, 3:36 AM, "Helge Waastad" <he...@waastad.org> wrote:

    Hi,
    Im testing out RancherOS in ACS and have a couple of issues.
    
    First, it seems that RancherOS does not support cloudstack datasource for meta/userdata but that I need to take with Rancher guys.
    
    But, in openstack I can always use configdrive to get userdata to my vm.
    
    Is it possible to use configdrive in acs? (i have'nt had any luck yet)
    
    Br hw
    
    
    
    
    Sendt fra Galaxy Tab