rhtconsulting / rhc-ose

OpenShift Automation and Utilities by Red Hat Consulting
42 stars 34 forks source link

Issues when using custom configuration file in Provisioning script #95

Open sabre1041 opened 8 years ago

sabre1041 commented 8 years ago

Several issues are present when attempting to provision an OSE 3.1 environment using a configuration file

Below is the configuration file that was used

## Platform Configs
#CONF_ENV_ID= # Default: random 8 character string
CONF_IMAGE_NAME=ose3_1-base # Default: ose3_0-base
CONF_OS_FLAVOR=m1.medium # Default: m1.medium
CONF_SECURITY_GROUP_MASTER=ose3-master # Default: ose3-master
CONF_SECURITY_GROUP_NODE=ose3-node # Default: ose3-node
#CONF_LOGFILE=~/openstack_provision.log # Default: ~/openstack_provision.log
## OpenShift Configs
CONF_OPENSHIFT_BASE_DOMAIN=openshift.example.com # Default: ose.example.com
CONF_OPENSHIFT_CLOUDAPPS_SUBDOMAIN=cloudapps # Default: apps
CONF_PROVISION_COMPONENTS=openshift # Comman separated list. Supported values are: openshift,cicd. Default: openshift
CONF_OPENSHIFT_IDENTITY_PROVIDER=htpasswd_auth # Default: htpasswd_auth
#CONF_OPENSHIFT_MASTER_FILES= # Example value: /path/to/source:/path/to/dest /path/to/source2:/path/to/dest2; Default is null
#CONF_OPENSHIFT_NODE_FILES= # Example value: /path/to/source:/path/to/dest /path/to/source2:/path/to/dest2; Default is null
CONF_VOLUME_SIZE=40 # Allocate a 25 GB volume for a shared OpenShift / Docker disk # Default: 10 GB
#CONF_STORAGE_SIZE_OSE=2 # Allocate 2 GB for the OpenShift partition (e.g.: /var/lib/openshift) # Default: 0 GB / not allocated
#CONF_STORAGE_SIZE_ETCD=2 # Allocate 2 GB for the etcd partition (e.g.: /var/lib/etcd) # Default: 2 GB
#CONF_STORAGE_SIZE_LOGGING=4 # Allocate 4 GB for the logging partition (e.g.: /var/log) # Default: 0 GB / not allocated

Command that was executed to provision environment

./osc-provision --num-nodes=2 --key=ablock-ose --ose-version=3.1 --config=/root/rhc-ose/provisioning/sample.cfg
oybed commented 8 years ago

@sabre1041 it almost sounds like you are using an old version of the repo. Can you please include info on where the repo came from and if you just cloned from github before attempting the install?

sabre1041 commented 8 years ago

@oybed a fresh repo pull

oybed commented 8 years ago

@sabre1041 I tried your configuration file and in my case I had a bit of a different outcome. Just like you, I see the /etc/openshift path for htpasswd (which is strange as it used to work - I'll continue to investigate). However, for the disk, it did indeed assign a 40G disk to each instance.

[root@master ~]# fdisk -l /dev/vdb

Disk /dev/vdb: 43.0 GB, 42953867264 bytes, 83894272 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00087e9d

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1               1     3906250     1953125   83  Linux
/dev/vdb2         3906251    83892319    39993034+  83  Linux

[root@master ~]# grep -B3 -A5 htpasswd /etc/origin/master/master-config.yaml 
  identityProviders:
  - challenge: true
    login: true
    name: htpasswd_auth
    provider:
      apiVersion: v1
      file: /etc/openshift/openshift-passwd
      kind: HTPasswdPasswordIdentityProvider
      mappingMethod: claim
oybed commented 8 years ago

@sabre1041 the /etc/openshift dir issue can most likely be worked around by updating the file "templates/htpasswd_auth" with the correct path as that's the one getting sourced in with the wrong path. I'll submit a PR to get a 3.1 specific template file in place to avoid this issue.

Also, if you comment out the CONF_OPENSHIFT_IDENTITY_PROVIDER variable in the config file, it should work fine.