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

Skip bootstrap after provisioning #6

Closed
shanmugakarna opened this issue Apr 18, 2017 · 5 comments
Closed

Skip bootstrap after provisioning #6

shanmugakarna opened this issue Apr 18, 2017 · 5 comments

Comments

@shanmugakarna
Copy link

shanmugakarna commented Apr 18, 2017

Hi,
Is it possible to skip bootstrapping the node after provisioning, and just use the IP of the node else where.
Having a requirement, that does not need the provisioned node to be part of chef
thanks

@jjasghar
Copy link

So, to provision a few machines with the machine resource, but not install chef-client on the provisioned machines?

@shanmugakarna
Copy link
Author

Yes @jjasghar , exactly
Scenarios like,

  • Some machine, not to be maintained by chef
  • Need to add some static routes in the machine before bootstrap

So, is it possible to provision a machine and get the IP of the machine to use it further differently, out of the regualr flow.

@jjasghar
Copy link

I put some thought into this, and no, i think this is out of scope (for the time being) of this gem.

The point of using chef-provisiong is to provision compute resources for chef. Skipping seems like something that this tool shouldn't be used to do.

Though, in your use case, PowerCLI can do something like the following if you needed:

$Cluster = Get-Cluster -Name Cluster
For ($i=0; $i -le 5; $i++) {
  New-VM -Name vm$i -Template TEMPLATE -ResourcePool $Cluster
}

or even teraform:

# Configure the VMware vSphere Provider
provider "vsphere" {
  user           = "[email protected]"
  password       = "ADMIN!"
  vsphere_server = "192.168.0.x"
  allow_unverified_ssl = true
}

# create a vm
resource "vsphere_virtual_machine" "web" {
  name   = "terraform-web"
  vcpu   = 2
  memory = 4096
  datacenter = "Datacenter"

  network_interface {
    label = "VM Network"
  }

  disk {
    template = "Linux/ubuntu16-template"
    type = "thin"
    bootable = "true"
  }
}

There's a chance I might come across this down the line, but it'll be unlikely in the near future.

@jjasghar
Copy link

@shanmugakarna interestingly after talking to @tyler-ball it's actually already built into chef-provisioning

If you do something like:

machine 'testing-ready' do
  tag 'mydb_master'
  action :ready
end

Notice the action :ready will provision and make sure the machine is up and waiting for you.

@skarungan
Copy link

skarungan commented May 5, 2017

Thank you so much @jjasghar. Sorry for the late reply.

Its really awesome, it works perfect.

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

No branches or pull requests

3 participants