Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 43D7E200B8C for ; Mon, 12 Sep 2016 13:38:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 42A4B160AC8; Mon, 12 Sep 2016 11:38:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 94DFE160AB8 for ; Mon, 12 Sep 2016 13:38:47 +0200 (CEST) Received: (qmail 55064 invoked by uid 500); 12 Sep 2016 11:38:46 -0000 Mailing-List: contact users-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cloudstack.apache.org Delivered-To: mailing list users@cloudstack.apache.org Received: (qmail 55049 invoked by uid 99); 12 Sep 2016 11:38:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2016 11:38:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 734EDC228D for ; Mon, 12 Sep 2016 11:38:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.721 X-Spam-Level: X-Spam-Status: No, score=-0.721 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id OVmIJ4mqfE52 for ; Mon, 12 Sep 2016 11:38:43 +0000 (UTC) Received: from smtp.domeneshop.no (smtp.domeneshop.no [194.63.252.55]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id D1EAE5F30C for ; Mon, 12 Sep 2016 11:38:42 +0000 (UTC) Received: from [2a04:6543:21:8:dd30:1da1:b0a9:6b98] (port=32900) by smtp.domeneshop.no with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1bjPZM-0003gi-5G; Mon, 12 Sep 2016 13:38:36 +0200 Message-ID: <1473680314.4232.4.camel@waastad.org> Subject: Re: configdrive in ACS From: Helge Waastad To: Sergey Levitskiy , "users@cloudstack.apache.org" Date: Mon, 12 Sep 2016 13:38:34 +0200 In-Reply-To: <3CE0DDEB-FD42-4FC6-AD99-6A30399D2694@autodesk.com> References: <3CE0DDEB-FD42-4FC6-AD99-6A30399D2694@autodesk.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit archived-at: Mon, 12 Sep 2016 11:38:48 -0000 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:”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" 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 > > >