Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we customize the VM name created by bosh #1163

Closed
StanleyShen opened this issue Mar 4, 2016 · 11 comments
Closed

Can we customize the VM name created by bosh #1163

StanleyShen opened this issue Mar 4, 2016 · 11 comments

Comments

@StanleyShen
Copy link

I am using bosh to deploy VM, the VMs have names like
access_z1/0
api_z1/0

But for better tracking, I would like to customized their name like

reserved - CF 3.0 access_z1/0 (Creator)
reserved - CF 3.0 api_z1/0/0 (Creator)

Is there a way to do it better except changing the name of job definitions?

@cppforlife
Copy link
Contributor

which IaaS are you requesting this for? on vSphere for example we use name to find machines, so naming it someone else would not work properly.

@cppforlife
Copy link
Contributor

Related issue: #1128

@voelzmo
Copy link
Contributor

voelzmo commented Mar 8, 2016

Hey @StanleyShen

I've already asked some questions in the issue linked by @cppforlife, but I'll just paste the same questions here. I'd be great if you could try to help us understand more about your use-case and its implications.

To get a better idea about what you are suggesting, a few questions:

  • What exactly are those names derived from? Where is reserved and CF 3.0 coming from? Is that the deployment name and some internal versioning? What does (Creator) refer to in your example? The bosh user which started the deployment that created this VM? What would that mean when the resurrector re-created a VM then?
  • Would your naming scheme be the same across all deployments deployed with the same BOSH Director? Would the names be different for each deployment because the deployment name is part of the VM name?
  • BOSH uses different names/identifiers for the VMs, so if you execute bosh vms or bosh instances in the commandline, you would see an entirely different list than you would see in your IaaS management UI. Is this an issue for your operators? How do they find the VM in the IaaS given an identifier from the BOSH commandline?

@StanleyShen
Copy link
Author

Sorry, I didn't make it clear, all these names are actually the name(tag) shows on AWS console UI.
What shown on bosh CLI is good enough.

Because the AWS account may be managed by different guys, in order to let others know who created these VMs and the purpose, it's much better to put some more useful information to name.
That's we are doing, in our case we want to put static string "reserved - CF 3.0" before and " (Creator)" after the name defined in deployment for job names. (In my case, these VMs created by me, so it's Stanley)

We can add these "reserved - CF 3.0", " (Stanley)" before/after the name manually in AWS console UI, but it will be gone if we update(recreate) these VMs.

I also don't want to change the jobs to such names, which is not good for maintenance too.
It's nice to have some ways in deployment file to achieve this functionality, it's not flexible to put it in director I think.

@dpb587-pivotal
Copy link
Contributor

Not quite the same solution, but custom tags were mentioned in #936 for adding metadata about similar details.

@cppforlife
Copy link
Contributor

@StanleyShen so just to clarify you would want to this to be included at the deployment level because different deployments will have a different prefix?

@StanleyShen
Copy link
Author

I think in deployment level is more flexible, for example different deployment I can have different prefix/postfix, right?

I may have two CF deployed on AWS, then 2 instances will have same names for each component.
In this case, I will need different postfix to indicate which cf instance, like:

reserved - CF instance1 access_z1/0 (Creator stanley)
reserved - CF instance2 api_z1/0/0 (Creator shen)

In one deployment, the prefix/postfix should be same for all jobs.

@mfine30
Copy link
Contributor

mfine30 commented Aug 7, 2018

@voelzmo copying my question from #1128 over here:

wondering the status on this issue. It looks like it hasn't gotten much attention in recent years. Do you have any updates or thoughts on next steps here?

@CAFxX
Copy link

CAFxX commented Aug 8, 2018

Sorry I missed some of @voelzmo questions in #1128, so let me answer here. Just to give some context, our need is based on the pre-existing naming conventions in effect on our internal IaaSes. These naming conventions are outside our control and we should follow them to be "good citizens" not just of the IaaS we're on, but of the whole ecosystem of inventory/monitoring/security tools we have internally.

Why would you want the IP in the VM name? Don't basically all tools show you name and IP side-by-side?

The naming convention is roughly as follows:

<project-id>-<dash-separated-IP>-<type>-<vm-id>

where <project-id> is the internal ID of project we are assigned, <dash-separated-IP> is something like 192-168-100-1, <type> is a string (can be considered a constant) and <vm-id> is basically free-form for the project to choose (in our case we would like to have "instance group-index-guid"

What does role in your above example mean? Are you referring to a jobname, such as nats or runner, or is it something different?

we used to call "role" what is now known as "instance group"

Would your naming scheme be the same across all deployments deployed with the same BOSH Director? In your example you include cf- as a prefix, so I assume this would be different for each deployment?

Ideally it would need to change based on the deployment. (i.e. different deployments on the same director may have different prefixes)

BOSH uses different names/identifiers for the VMs, so if you execute bosh vms or bosh instances in the commandline, you would see an entirely different list than you would see in your IaaS management UI. Is this an issue for your operators? How do they find the VM in the IaaS given an identifier from the BOSH commandline?

That is the reason why we would like to have "instance group-index-guid" in the <vm-id> part. IIRC we can also query using the VM metadata stored on vSphere/Openstack.

@bosh-admin-bot
Copy link

This issue was marked as Stale because it has been open for 21 days without any activity. If no activity takes place in the coming 7 days it will automatically be close. To prevent this from happening remove the Stale label or comment below.

@bosh-admin-bot
Copy link

This issue was closed because it has been labeled Stale for 7 days without subsequent activity. Feel free to re-open this issue at any time by commenting below.

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

No branches or pull requests

7 participants