Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Support CustomData #1048

Merged
merged 4 commits into from Feb 1, 2014
Merged

Support CustomData #1048

merged 4 commits into from Feb 1, 2014

Conversation

szarkos
Copy link

@szarkos szarkos commented Nov 6, 2013

As of the latest fabric update a new element called "CustomData" can be
defined for the Windows/Linux Provisioning Configuration data:
http://msdn.microsoft.com/en-us/library/windowsazure/jj157194.aspx

This patch adds a new parameter called "--custom-data" that points to a
file. The contents of the file will be base64 encoded and added to the
Windows/Linux Provisioning Configuration data.

Stephen Zarkos added 3 commits November 6, 2013 12:36
As of the latest fabric update a new element called "CustomData" can be
defined for the Windows/Linux Provisioning Configuration data:
http://msdn.microsoft.com/en-us/library/windowsazure/jj157194.aspx

This patch adds a new parameter called "--custom-data" that points to a
file.  The contents of the file will be base64 encoded and added to the
Windows/Linux Provisioning Configuration data.
@ghost ghost assigned eduardkoller Dec 10, 2013
@markcowl
Copy link
Member

@eduardkoller Can we accept this?

* dev:
  update readme for mobile services scale changes
  add column support, update tests
  Add contributors.txt and update copyrights
  add missing server delete recording
  Update ChangeLog.txt
  add confirmation prompt to scale due to term reuse
  Fix incorrect reference
  Update shrinkwrap for node 0.6
  Fix issue with missing body in request POST / PUT
  new tier modes
  new tier modes
  Update windows installer version
  Lock dependencies
  Add check for hostnames on site browse
  Update README.md
  Update README.md
  Add missing semicolon
  Update version and dependency
@acharyarajiv
Copy link
Contributor

@szarkos : I see no customdata tag in request input xml after passing --custom-data option in create vm
Code is broken somewhere

@szarkos
Copy link
Author

szarkos commented Dec 24, 2013

You'll need this patch too: Azure/azure-sdk-for-node#1054

@acharyarajiv
Copy link
Contributor

@szarkos : It is still not working
Here is the steps i followed

Am i missing something or anything else is needed?

@szarkos
Copy link
Author

szarkos commented Jan 10, 2014

Hi,

I think the issue could be related to trying to get the latest sdk and xplat tools working together. Possibly your install may be pointing to the wrong sdk, or if you ran 'npm install' again from the azure-sdk-tools-xplat directory then the sdk may have been re-downloaded (replacing your patched version).

From pull request Azure/azure-sdk-for-node#1054, just verify that the two files in your azure sdk were modified accordingly:
lib/services/management/models/roleschema.json
lib/services/management/servicemanagementservice.js

If roleschema.json is still the old version (without the customdata parameters), then you would still be able to use the --custom-data flag from the cli, but the customdata would not actually get sent.

Thanks,
Steve

@acharyarajiv
Copy link
Contributor

@szarkos : Thanks Steve. It worked. The customdata tag is passed in request xml now.

Just for confirmation. were you able to locate or see the file customdata.bin in %SYSTEMDRIVE%\AzureData folder in the VM that got created.
I created a windows VM and i don't see the azuredata folder created inside systemdrive.

@szarkos
Copy link
Author

szarkos commented Jan 27, 2014

Hi Rajeeva,

I'm not able to repro this issue, I do see the azuredata/CustomData.bin file in my test.

The original version of the patch did not have support for Windows, so you will want to use that later revisions. For example, you should have this version of vm._js: https://github.com/szarkos/azure-sdk-tools-xplat/blob/7858054be6dc01268e82cdd655a3553abddff522/lib/commands/vm._js

The patches for the SDK for Node have already been merged into the dev branch there, so you can use that branch. Or to manually check, you could quickly take a look at "lib/services/management/lib/models/roleschema.json" in the SDK and ensure there are two declarations of CustomData; one under the WindowsProvisioningConfiguration and one for the LinuxProvisioningConfiguration.

Thanks,
Steve

@acharyarajiv
Copy link
Contributor

@szarkos 👍 Thanks Steve. It worked

andrerod pushed a commit that referenced this pull request Feb 1, 2014
@andrerod andrerod merged commit a1c9669 into Azure:dev Feb 1, 2014
@sudhansh
Copy link

i'm trying to execute a simple shell script using the --custom-data param on a ubuntu image from the gallery, but it doesn't seem to execute. I see the /var/lib/waagent/ovf-env.xml has the CustomData base encoded64 to the th escript i passed in however it still does not execute this simple script. My test is to just create a dir under /home/.
The xplat-cli version is 0.8.17. What am i missing here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants