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

VSM install-cli output could be improved #378

Closed pavanbhat21 closed 8 years ago

pavanbhat21 commented 8 years ago

OS details: RHEL 7.2

Provider: Libvirt

Output of vagrant -v:

Vagrant 1.7.4

Output of vagrant plugin list:

landrush (1.1.1)
  - Version Constraint: 1.1.1
vagrant-libvirt (0.0.32, system)
vagrant-registration (1.2.3)
  - Version Constraint: 1.2.3
vagrant-service-manager (1.3.0)
  - Version Constraint: 1.3.0
vagrant-sshfs (1.2.0)
  - Version Constraint: 1.2.0

Output of vagrant service-manager box version:

Container Development Kit (CDK) 2.2

Steps to reproduce the issue:

  1. Install any client binary, for instance kubernetes
  2. vagrant service-manager install-cli kubernetes

Describe the results you received:

# Binary now available at /home/pavan/.vagrant.d/data/service-manager/bin/kubernetes/1.2.0/kubectl
# run binary as:
# kubectl <command>
export PATH=/home/pavan/.vagrant.d/data/service-manager/bin/kubernetes/1.2.0:$PATH

# run following command to configure your shell:
# eval "$(VAGRANT_NO_COLOR=1 vagrant service-manager install-cli kubernetes | tr -d '\r')"

Describe the results you expected: I expect the script to set the env variables rather than offering the user to set those manually, because if user is downloading a binary, he would intent to use it. So install, set env and output can be something like below:

#Kubernetes binary is installed and available at <loc>. the binary can be used as:
# kubectl help
coolbrg commented 8 years ago

Since due to this comment https://github.com/projectatomic/vagrant-service-manager/issues/26#issuecomment-209447761, we cannot export the environment variables directly from Ruby which will persists even after Ruby program ends or command exits in case of vagrant service-manager, this enhancement is difficult to implement.

Feel free to reopen it if there is any other use case.