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

Conversation

@vishrutshah
Copy link
Contributor

@vishrutshah vishrutshah commented Aug 22, 2017

@msftclas
Copy link

@vishrutshah,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Adding sample to verify that MSI extension service is running
@vishrutshah
Copy link
Contributor Author

@veronicagg @sarangan12 Feel free to review when you get a chance. Thanks!

Copy link
Contributor

@veronicagg veronicagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments/suggestions inline.


<a id="vnet"></a>
### Create a virtual network

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to add a comment or two to each section, since the beginning starts with a sentence, but then it doesn't look like we "comment" much on what's expected.
Maybe here could be something, "We create a VM so we can install MSI, this looks like a regular Azure VM creation."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also add a reference to a regular VM creation example?

```

<a id="ipaddress"></a>
### Create a public IP address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment suggestion: We set up the VM by creating an IP address and its network interface,

```

<a id="vm"></a>
### Create a virtual machine with system identity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed for any VM creation or is there anything special for MSI setting, maybe comment something on that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assigning the identity of type SystemAssigned is the only part that is different from normal vm creation. I've added that information in the explanation.

```

<a id="extension"></a>
### Add MSI extension to the VM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there more we could explain here? are there some MSI docs we can refer to from Azure?
anything on where the values shown below should be coming from?

Copy link
Contributor Author

@vishrutshah vishrutshah Sep 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. We don't have doc yet. but we can add it later once available on docs / msdn


<a id="msi-extension"></a>
### Verify MSI extension is running on VM by logging-in via ssh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a good idea to indicate what to look for? and why?
I see that in the actual code, we have a comment that says, run this command and look for X.

```

<a id="delete"></a>
### Delete the resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe clarify that deleting this would get rid of everything, therefore if running the sample and wanting to keep stuff around, the line below should be commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added more comments for each steps for more insights as per the suggestion :)

Copy link
Contributor

@sarangan12 sarangan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit comments as other PR. Otherwose looks fine

@vishrutshah
Copy link
Contributor Author

@veronicagg @sarangan12 I've addressed comments and added more docs around steps. Let me know what you think now. Thanks!

Copy link
Contributor

@veronicagg veronicagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vishrutshah
Copy link
Contributor Author

vishrutshah commented Sep 13, 2017

@veronicagg @sarangan12 FYI

@lmazuel found that this sample does require more configuration in terms of assigning roles with enough permissions. This sample is kind of incomplete :( and I missed it because the way I was creating VMs via this sample v/s way CLI / sample deployment template does differ i.e this would not work as-is.

That being said, I am adding more code on role assignment that is required to make this correct.

@vishrutshah
Copy link
Contributor Author

@veronicagg @sarangan12 Please re-review this sample. Thanks!

@veronicagg
Copy link
Contributor

@vishrutshah good to know, what wasn't working? how did it run for you before?

@vishrutshah
Copy link
Contributor Author

@veronicagg I did create Azure VM from the Azure portal and added MSI extension extension then to test out sample to acquire token. While this sample I used to create linux VM and did not run the other sample on this VM but only checked whether token can be acquired using cURL request which was successful. Which missed the case that you can acquire the token but not use it unless you have role assignments. When @lmazuel looked at the sample for python he found that this was not complete and he discovered the missing step.

@vishrutshah vishrutshah merged commit 2da33f2 into Azure-Samples:master Sep 13, 2017
@vishrutshah vishrutshah deleted the msi-sample branch September 13, 2017 20:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants