OpenShift 3 AIO Install

Latest response

I am getting to grips with OpenShift and need to install OpenShift 3 - not v.4 since there is no Docker anymore with 4.

I am following this simple guide:

https://www.openshift.com/blog/openshift-all-in-one-aio-for-labs-and-fun

I am using a Red Hat Developer Subscription which is fresh and current.

Part of these instructions are to enable a repo called "rhel-7-server-ose-3.11-rpms"

Yes, the OpenShift 3 repo ... however it does not appear in the list of my available repo subscriptions.

How can I get a subscription to this ?

Responses

Do you see it if you run this command? subscription-manager list --available

No, there is no subscription which is the problem: ˜No available subscription pools to list˜ How can I get one assigned so I can run OpenShift 3 AIO as per the blog?

OK managed to locate the "60 Day Evaluation of Red Hat OpenShift Container Platform, Self-supported (32 Cores)"

Another one has cropped up now. Working through the AIO guide as per link in top post:

Running the first prerequisites playbook:

ansible-playbook -i inventory_aio /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml

Getting:

TASK [rhel_subscribe : fail] **********************************************************************************************************************
fatal: [openshift3.alpine.lab]: FAILED! => {"msg": "The conditional check 'openshift_deployment_type == 'openshift-enterprise'' failed. The error was: error while evaluating conditional (openshift_deployment_type == 'openshift-enterprise'): 'openshift_deployment_type' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- fail:\n  ^ here\n"}
    to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/prerequisites.retry

PLAY RECAP ****************************************************************************************************************************************
localhost                  : ok=12   changed=0    unreachable=0    failed=0   
openshift3.alpine.lab      : ok=14   changed=0    unreachable=0    failed=1   


INSTALLER STATUS **********************************************************************************************************************************
Initialization  : In Progress (0:00:12)

Did you check main.yml to see if openshift_deployment_type is defined ? The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/main.yml': line 2, column 3,

Could it be that the redhat_subscription username and password need to be manually filled in to this file ? EDIT: Tried adding creds but same error occurred.

Check the contents of the inventory file also

OK I think I may have just used what is referred to as the core section of the inventory file as opposed to one as shown here: https://github.com/williamcaban/openshift-lab/blob/master/inventory-host-aio-TEMPLATE.yaml

OK - using a inventroy aio file based on the github link things moved forward - a lot more tasks got executed but fails here:


TASK [Run variable sanity checks] *********************************************************************************************************************************** fatal: [openshift3.alpine.lab]: FAILED! => {"msg": "last_checked_host: openshift3.alpine.lab, last_checked_var: oreg_auth_password;'REGISTRY_TOKEN' is undefined"} to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/prerequisites.retry PLAY RECAP ********************************************************************************************************************************************************** localhost : ok=12 changed=0 unreachable=0 failed=0 openshift3.alpine.lab : ok=46 changed=7 unreachable=0 failed=1

i think in the inventory file, just change the REGISTRY variables to literals

NOTE: Need credentials from: https://access.redhat.com/terms-based-registry/

oreg_url=registry.redhat.io/openshift3/ose-${component}:${version}
oreg_auth_user={{REGISTY_USER}}
oreg_auth_password={{REGISTRY_TOKEN}}

Keeps failing same spot. Must be doing some thing wrong when filling in the oreg_auth_password.


TASK [Run variable sanity checks] *********************************************************************************************************************************** fatal: [openshift3.alpine.lab]: FAILED! => {"msg": "last_checked_host: openshift3.alpine.lab, last_checked_var: oreg_auth_password;'eyJhbGciOiJSUzUxMiJ9' is undefined"} to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/prerequisites.retry PLAY RECAP ********************************************************************************************************************************************************** localhost : ok=12 changed=0 unreachable=0 failed=0 openshift3.alpine.lab : ok=46 changed=4 unreachable=0 failed=1 INSTALLER STATUS **************************************************************************************************************************************************** Initialization : In Progress (0:03:11) [root@openstack3 ~]# grep eyJ inventory_aio oreg_auth_password={{eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJhMTNhYTViYjEyOWI0YTRmOGRkMWVhOGI5MWYxNDg5YyJ9.uPSW_vxa225KJ4sk9_nuozRIlysfReQTBzDvBFMJrHbD6MkkXBSEBE5OR9k6gJnc6PTA3JN6rYRWzlyv-tyNqBUcfhow_AoWo4Y9mUexUit4BJxlfIHD8FObHmYfW2ZeH3-DUSp0GK51huMEV9h_lfqAZGFcnc6elg4QGxUrgUgSw_bcC0KCNhEvybkxDd6jbAsvS492-CV9KbKiDxGBkE9xgZ1ZyJuOn-u6xi8iep3DHujQNW7ZwWDzMQmzdIQfG4qLp7j-bMHfRKAn6oq1crCtU_4gMQQqpnb_-ysL8DKvLIIRS87wj_6INk2PHyJLfrHnF4plLbRW1Ql4rhHEE_oy9TRC2s9rj9lkKvAe5QzQvBRzDymoQrChzT4Cn8aqJpxZmIlld6s7o-IGdVOIxSdagHybD44h1wGOWEwxZ_CiBBGkg7bGiiGI7amcyI

Do I need the full token or just up to the . ?

I have been simply copy the full token in to between the {{}}

OK - needed to quote and not use {{}}

OK that got a lot of further that time and took around 10 minutes or perhaps slightly more but then failed again.

Is there no easier way to get this up and running ?


TASK [container_runtime : Create for any additional registries] *************************************************************************************************************************************************** fatal: [openshift3.alpine.lab]: FAILED! => {"msg": "'REGISTRY_TOKEN' is undefined"} to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/prerequisites.retry PLAY RECAP ******************************************************************************************************************************************************************************************************** localhost : ok=12 changed=0 unreachable=0 failed=0 openshift3.alpine.lab : ok=86 changed=18 unreachable=0 failed=1

Just wanted to recap here and see if any more assistance can be provided.

Failure is occurring when running the following:

ansible-playbook -i inventory_aio /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml

The failure is:

RUNNING HANDLER [container_runtime : restart container runtime] *********************************************************************************************************************************
skipping: [openshift3.alpine.lab]

TASK [container_runtime : Create credentials for oreg_url] **************************************************************************************************************************************
changed: [openshift3.alpine.lab]

TASK [container_runtime : Create for any additional registries] *********************************************************************************************************************************
**fatal: [openshift3.alpine.lab]: FAILED! => {"msg": "'REGISTRY_TOKEN' is undefined"}**

PLAY RECAP **************************************************************************************************************************************************************************************
localhost                  : ok=12   changed=0    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0   
openshift3.alpine.lab      : ok=86   changed=20   unreachable=0    failed=1    skipped=75   rescued=0    ignored=0   


INSTALLER STATUS ********************************************************************************************************************************************************************************
Initialization  : Complete (0:01:55)

My inventory_aio file looks like this:


# # ansible inventory for OpenShift Container Platform 3.11.98 # ########################################################################### # # DISCLAIMER: THIS ALL-IN-ONE DEPLOYMENT IS AN UNSUPPORTED DEPLOYMENT # USING NFS AS STORAGE BACKEND FOR INFRASTRUCTURE COMPONENTS # ########################################################################### # ## All-in-One (AIO) SERVER WITH EMBEDDED NFS: # - assume AIO node name: openshift3.alpine.lab # - assume app wildcard name: *.apps.openshift3.alpine.lab # - assume NFS server configure to export /srv/nfs # - using docker or CRI-O # ## If using dnsmasq as the DNS for the lab, the entry will be: # $ cat /etc/dnsmasq.d/openshift3.alpine.lab.conf # address=/openshift3.alpine.lab/192.168.1.30 # # Where the IP is the IP of your RHEL AIO server. This entry will also # resolve anything *.openshift3.alpine.lab to the same IP address. # ## NOTE 2: Some services have been set to use *ephemeral* storage # ########################################################################### # Configuring your inventory file # https://docs.openshift.com/container-platform/3.11/install/configuring_inventory_file.html [OSEv3:vars] ########################################################################### ### Ansible Vars ########################################################################### timeout=60 ansible_user=root #ansible_become=yes ########################################################################### ### OpenShift Basic Vars ########################################################################### # Deployment type openshift_deployment_type=openshift-enterprise #openshift_deployment_type=origin # WARNING: only disable these checks in LAB/TEST environments(Do not use in production) openshift_disable_check="disk_availability,memory_availability" # OpenShift Version(Always use sub-release for smoother upgrades): openshift_release=3.11.219 # Deploy Operator Lifecycle Manager (Tech Preview) openshift_enable_olm=true # Enable NFS support for infrastructure components (unsupported) openshift_enable_unsupported_configurations=true ########################################################################### ### Enable CRI-O ########################################################################### #openshift_use_crio=True #openshift_use_crio_only=False #openshift_crio_enable_docker_gc=True ########################################################################### ### OpenShift Registries Locations ########################################################################### # NOTE: Need credentials from: https://access.redhat.com/terms-based-registry/ oreg_url=registry.redhat.io/openshift3/ose-${component}:${version} oreg_auth_user="13365705|opeuseridh" oreg_auth_password="eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiIyMzU4ZmNkOTExNGQ0NjE1OTlmYjkzZDg1NjYzOTZlYiJ9.O_xJ7kzZku0lE_RUDJASdUy6xCXObTFyDid8Ob7XGUB0wFvS5_GgJyYzQMslu0xlXN5GnY4h5CpukXBQKDuyuEmRhKjL82ClJ4sYZEF-bL9VxNZJ2Jx8TJri1Trw3I7PuriDKtsghTOz-UiihW4ZvPa7a8Qb6pWEEzVZQKmGPUPihG-v6y7K0JtdM_QtKDGoX7kp4jxNfi29AWdNkNv667VLfm2pEKBk6n5IGHiD4I1FYKBbPHBTlFNjjVmFowDtm3Tul9HMn3LexWf7m1vbU24bUatk4zGV298xqFVRPbwZusuGbm_O97AtaIcAsRC7t8tAsVUBbSP8CXUJKNoUgyiMOgVtvss5eT-XlR6iZGwG0G5-fK3EYOAyEYuYrrzZvWDexAoeCDNAjF2bMA0WgUuZmwCtYKdZ_UuW3LO4Ag4-RzAnNFh6VL1tecnEZqibxcWdcfA-NFre9u1bIIcdLRp-0Ae5CkrBiOX1lr2D9yj_Li0dkL7UOy4tTVRqeuamWU-tIlaAEFS1XmsFaa2uBpSxQ6eqksVY3D4ZRxjhalKwbSe2Fr1ri74lGewmndZR31KaKRTo0CuueykmbnGg3TsNnjA_ZH4z0LP5r0_H6J9aHgVKkeHKtaAmXZMyWOcQNFjMkV-TdMMZjoMHkH_wWrwG_IoFkOKMG9KOYHuNmro" # For Operator Framework Images openshift_additional_registry_credentials=[{'host':'registry.connect.redhat.com','user':'{{REGISTY_USER}}','password':'{{REGISTRY_TOKEN}}','test_image':'mongodb/enterprise-operator:0.3.2'}] # Update examples to point to oreg_url # NOTE: change this if using disconnected install openshift_examples_modify_imagestreams=false # NOTE: accept insecure registries and registries with self-signed certs # setup for lab environment openshift_docker_hosted_registry_insecure=true ########################################################################### ### OpenShift Master Vars ########################################################################### openshift_master_api_port=8443 openshift_master_console_port=8443 #Default: openshift_master_cluster_method=native # Internal cluster name openshift_master_cluster_hostname=openshift3.alpine.lab # NOTE: Default wildcard domain for applications openshift_master_default_subdomain=apps.openshift3.alpine.lab ########################################################################### ### OpenShift Network Vars ########################################################################### # Defaults #osm_cluster_network_cidr=10.1.0.0/16 #openshift_portal_net=172.30.0.0/16 os_sdn_network_plugin_name='redhat/openshift-ovs-networkpolicy' ########################################################################### ### OpenShift Authentication Vars ########################################################################### # htpasswd Authentication(Non-Priviledge UI User until formal identity provider is used. For now htpasswd identity provider) # NOTE: read initial identities in htpasswd format from /root/htpasswd.openshift openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}] # Using an external htpasswd file use this: #openshift_master_htpasswd_file=/home/cloud-user/htpasswd.openshift # For embeddng the initial users in the configuration file use this syntax # Note: user==password for this example openshift_master_htpasswd_users={'ocpadmin':'$apr1$ZuJlQr.Y$6abuePAhKG0iY8QDNWoq80','developer':'$apr1$QE2hKzLx$4ZeptR1hHNP538zRh/Pew.'} ########################################################################### ### OpenShift Metrics and Logging Vars ########################################################################### ######################### # Prometheus Cluster Monitoring ######################### # https://github.com/openshift/openshift-docs/blob/master/install_config/monitoring/configuring-openshift-cluster-monitoring.adoc # https://github.com/openshift/openshift-docs/tree/enterprise-3.11/install_config/monitoring openshift_cluster_monitoring_operator_install=true #openshift_prometheus_node_selector={"node-role.kubernetes.io/infra":"true"} # NOTE: Setup for lab environment # Enable persistent storage of Prometheus time-series data (default false) openshift_cluster_monitoring_operator_prometheus_storage_enabled=false # Enable persistent storage of Alertmanager notifications (default false) openshift_cluster_monitoring_operator_alertmanager_storage_enabled=false ######################## # Cluster Metrics ######################## # https://github.com/openshift/openshift-docs/blob/enterprise-3.11/install_config/cluster_metrics.adoc openshift_metrics_install_metrics=true # Store Metrics for 1 days openshift_metrics_duration=1 openshift_metrics_storage_kind=nfs openshift_metrics_storage_access_modes=['ReadWriteOnce'] openshift_metrics_storage_nfs_directory=/srv/nfs openshift_metrics_storage_nfs_options='*(rw,root_squash)' openshift_metrics_storage_volume_name=metrics openshift_metrics_storage_volume_size=10Gi openshift_metrics_storage_labels={'storage': 'metrics'} # cassandra -- ephemeral storage (for testing) openshift_metrics_cassandra_storage_type=emptydir openshift_metrics_cassandra_replicas=1 openshift_metrics_cassandra_limits_memory=2Gi openshift_metrics_cassandra_limits_cpu=800m openshift_metrics_cassandra_nodeselector={"node-role.kubernetes.io/infra": "true"} # hawkular openshift_metrics_hawkular_limits_memory=2Gi openshift_metrics_hawkular_limits_cpu=800m openshift_metrics_hawkular_replicas=1 openshift_metrics_hawkular_nodeselector={"node-role.kubernetes.io/infra": "true"} # heapster openshift_metrics_heapster_limits_memory=2Gi openshift_metrics_heapster_limits_cpu=800m openshift_metrics_heapster_nodeselector={"node-role.kubernetes.io/infra": "true"} ######################## # Cluster Logging ######################## # https://github.com/openshift/openshift-docs/blob/enterprise-3.11/install_config/aggregate_logging.adoc # install logging openshift_logging_install_logging=true # logging curator openshift_logging_curator_default_days=1 openshift_logging_curator_cpu_limit=500m openshift_logging_curator_memory_limit=1Gi openshift_logging_curator_nodeselector={"node-role.kubernetes.io/infra": "true"} # Configure a second ES+Kibana cluster for operations logs # Fluend splits the logs accordingly openshift_logging_use_ops=false # Fluentd openshift_logging_fluentd_cpu_limit=500m openshift_logging_fluentd_memory_limit=1Gi # collect audit.log to ES openshift_logging_fluentd_audit_container_engine=false # persistent storage for logs openshift_logging_storage_kind=nfs openshift_logging_storage_access_modes=['ReadWriteOnce'] openshift_logging_storage_nfs_directory=/srv/nfs openshift_logging_storage_nfs_options='*(rw,root_squash)' openshift_logging_storage_volume_name=logging openshift_logging_storage_volume_size=10Gi openshift_logging_storage_labels={'storage': 'logging'} # eventrouter openshift_logging_install_eventrouter=true openshift_logging_eventrouter_nodeselector={"node-role.kubernetes.io/infra": "true"} # Elasticsearch (ES) # ES cluster size (HA ES >= 3) openshift_logging_es_cluster_size=1 # replicas per shard #openshift_logging_es_number_of_replicas=1 # shards per index #openshift_logging_es_number_of_shards=1 openshift_logging_es_cpu_limit=500m openshift_logging_es_memory_limit=1Gi # PVC size omitted == ephemeral vols are used #openshift_logging_es_pvc_siz=10G openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra": "true"} # Kibana openshift_logging_kibana_cpu_limit=500m openshift_logging_kibana_memory_limit=1Gi openshift_logging_kibana_replica_count=1 # expose ES? (default false) openshift_logging_es_allow_external=false openshift_logging_kibana_nodeselector={"node-role.kubernetes.io/infra": "true"} ########################################################################### ### OpenShift Router and Registry Vars ########################################################################### # NOTE: Qty should NOT exceed the number of infra nodes openshift_hosted_router_replicas=1 openshift_hosted_registry_replicas=1 openshift_hosted_registry_pullthrough=true openshift_hosted_registry_acceptschema2=true openshift_hosted_registry_enforcequota=true openshift_hosted_registry_storage_kind=nfs openshift_hosted_registry_storage_access_modes=['ReadWriteMany'] openshift_hosted_registry_storage_nfs_directory=/srv/nfs openshift_hosted_registry_storage_nfs_options='*(rw,root_squash)' openshift_hosted_registry_storage_volume_name=registry openshift_hosted_registry_storage_volume_size=10Gi openshift_hosted_registry_selector="node-role.kubernetes.io/infra=true" ########################################################################### ### OpenShift Service Catalog Vars ########################################################################### # default=true openshift_enable_service_catalog=true # default=true template_service_broker_install=true openshift_template_service_broker_namespaces=['openshift'] # default=true ansible_service_broker_install=true ansible_service_broker_local_registry_whitelist=['.*-apb$'] ########################################################################### ### OpenShift Cockpit Vars and plugins ########################################################################### # Disable cockpit osm_use_cockpit=false ########################################################################### ### OpenShift Hosts ########################################################################### [OSEv3:children] nfs masters etcd nodes [nfs] openshift3.alpine.lab [masters] openshift3.alpine.lab [etcd] openshift3.alpine.lab [nodes] ## All-In-One with CRI-O #openshift3.alpine.lab openshift_node_group_name='node-config-all-in-one-crio' openshift_node_problem_detector_install=true ## All-In-One with Docker openshift3.alpine.lab openshift_node_group_name='node-config-all-in-one' openshift_node_problem_detector_install=true # # END OF FILE #

Not sure why the error message "'REGISTRY_TOKEN' is undefined" when it is defined and in place. This message was occuring much earlier before however formatting the token in to the *inventory_aio

REGISTERY_TOKEN is reference elsewhere ie
openshift_additional_registry_credentials= [{'host':'registry.connect.redhat.com','user':'{{REGISTY_USER}}','password':'{{REGISTRY_TOKEN}}','test_image':'mongodb/enterprise-operator:0.3.2'}]
You probably need to define the variable somewhere or replace it with literal strings everywhere