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

Openshift configurations are not working in Vagrantfile for any one or two options #366

Closed coolbrg closed 8 years ago

coolbrg commented 8 years ago

Hi,

Configuring OpenShift with custom tag, name and docker registry does not work when we specify one or two options. It works only when we specify all three options.

# Vagrantfile
IMAGE_TAG="v1.2.0"

Vagrant.configure(2) do |config|
  config.vm.box = 'projectatomic/adb'

  config.servicemanager.services = 'openshift'
  config.servicemanager.openshift_image_tag = IMAGE_TAG
end

Above Vagrantfile does not work.

Following Vagrantfile will work:

IMAGE_TAG="v1.2.0"
IMAGE_NAME="openshift/origin"
DOCKER_REGISTRY="docker.io"

Vagrant.configure(2) do |config|
  config.vm.box = 'projectatomic/adb'

  config.servicemanager.services = 'openshift'
  config.servicemanager.openshift_image_tag = IMAGE_TAG
  config.servicemanager.openshift_image_name= IMAGE_NAME
  config.servicemanager.openshift_docker_registry = DOCKER_REGISTRY
end
praveenkumar commented 8 years ago

@budhrg Also attach logs which we discussed and saw.

coolbrg commented 8 years ago

More logs from inside VM:

adb-utils 1.6

##### Vagrantfile
IMAGE_TAG = 'v1.2.0'

Vagrant.configure("2") do |config|
  config.vm.box = "adb-2.1.0"

  config.servicemanager.services = 'openshift'
  config.servicemanager.openshift_image_tag = IMAGE_TAG
end

###### Inside VM after "vagrant ssh"
[vagrant@centos7-adb ~]$ sudo cat /etc/sysconfig/openshift_option
# /etc/sysconfig/openshift_options

# Modify these options if you want to change openshift hostname
OPENSHIFT_SUBDOMAIN="$(hostname).$(/opt/adb/openshift/get_ip_address).xip.io"
IMAGE="docker.io/openshift/origin:v1.2.0"

##### adb-utils
[vagrant@centos7-adb ~]$ rpm -qa adb-utils
adb-utils-1.6-1.el7.noarch

From adb-utils 1.7

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'adb-2.2.0'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vagrant-service-manager_default_1470311254770_4375
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
...........
==> default: Configuring and enabling network interfaces...
Copying TLS certificates to /home/budhram/redhat/vagrant-service-manager/.vagrant/machines/default/virtualbox/docker
The folowing SH comand responded with a non-zero exit status.
Vagrant asumes that this means the comand failed!
IMAGE_TAG='v1.2.0' scli openshift
Stdout from the comand:
Stder from the comand:
Permisison denined: /etc/sysconfig/openshift_option
==> default: Rsyncing folder: /home/budhram/redhat/vagrant-service-manager/ => /vagrant

####### inside VM
[vagrant@centos7-adb ~]$ sudo cat /etc/sysconfig/openshift_option 
# /etc/sysconfig/openshift_options

# Modify these options if you want to change openshift hostname
OPENSHIFT_SUBDOMAIN="$(hostname).$(/opt/adb/openshift/get_ip_address).xip.io"
IMAGE="docker.io/openshift/origin:latest"

###### adb-utils
[vagrant@centos7-adb ~]$ rpm -qa adb-utils
adb-utils-1.7-1.el7.noarch
coolbrg commented 8 years ago

Closing this issue as it is mostly adb-utils issue and is being tracked here https://github.com/projectatomic/adb-utils/issues/177.