projectatomic / vagrant-service-manager

To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.
GNU General Public License v2.0
18 stars 16 forks source link

Fix #379: Success message after vagrant up for Kubernetes #381

Closed coolbrg closed 8 years ago

coolbrg commented 8 years ago

Fix #379

Report success or failure message at the end of vagrant up process for services mentioned in Vagrantfile as config.servicemanager.services = 'kubernetes'

coolbrg commented 8 years ago

cc @bexelbie @navidshaikh @LalatenduMohanty

coolbrg commented 8 years ago

retest this please

coolbrg commented 8 years ago

retest this please

coolbrg commented 8 years ago

There are following two scenarios where to display the message.

1. Vagrantfile

Vagrant.configure(2) do |config|

  config.vm.box = "cdkv2"
  config.servicemanager.services = 'kubernetes'

end

Vagrant up

➜  vagrant-service-manager git:(fix-379) ✗ bundle exec vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'cdkv2'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vagrant-service-manager_default_1471948442643_72354
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: translation missing: en.servicemanager.action.private_network
==> default: Preparing network interfaces based on configuration...
...........
==> default: Configuring and enabling network interfaces...
==> default: Landrush IP not installed in guest yet (or it's an outdated version). Installing now.
==> default: Copying TLS certificates to /home/budhram/redhat/vagrant-service-manager/.vagrant/machines/default/virtualbox/docker
==> default: Rsyncing folder: /home/budhram/redhat/vagrant-service-manager/ => /vagrant
==> default: Kubernetes service configured successfully...
Message is displayed as expected place.

2. Using rhel-k8s-singlenode-setup Vagrantfile from ADB repo

➜  vagrant-service-manager git:(fix-379) ✗ bundle exec vagrant up 
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'cdkv2'...
........
==> default: Configuring and enabling network interfaces...
==> default: Landrush IP not installed in guest yet (or it's an outdated version). Installing now.
==> default: Copying TLS certificates to /home/budhram/redhat/vagrant-service-manager/.vagrant/machines/default/virtualbox/docker
==> default: Rsyncing folder: /home/budhram/redhat/vagrant-service-manager/ => /vagrant
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: /home/budhram => /home/budhram
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Folder Successfully Mounted!
==> default: Kubernetes service configured successfully...
==> default: Running provisioner: shell...
    default: Running: inline script

In the 2nd case the message Kubernetes service configured successfully... is shown before provisioners are running. IMO, this make sense to not alter the normal behavior of vagrant up messages by explicitly putting the kubernetes success message at the last line.

One more scenario where we don't want Kubernetes success message at last is, suppose we have some custom provisioner which is doing some exatra operations over kubernetes server, then in that case putting the message Kubernetes service configured successfully... after provisioners is running might confuse the user.

LalatenduMohanty commented 8 years ago

IMO, this make sense to not alter the normal behavior of vagrant up messages by explicitly putting the kubernetes success message at the last line.

Agree

navidshaikh commented 8 years ago

LGTM