Thanks for the video, this should help devs alot. But for us admins even more interesting would be installing a full BYO setup with masters/infra/nodes in multiple virtual machines so we can simulate a full fledged cluster.
This video is very much helpful to me.I have one question- I have install openshift origin 3.9 using inventory file like you: I have used below line for metrics installation : openshift_metrics_install_metrics=true openshift_metrics_hawkuler_hostname=hawkular-metrics.example.com openshift_master_metrics_public_url=hawkular-metrics.example.com/hawkular/metrics And I installed using inventory file with prerequisites.yaml and then deploy_cluster.yaml ,so that hawker-cassandra,hawkular-metrics and heapster in running condition and oc adm top node command is working. but Problem is cannot access hawkular metrics by below command. curl -H "Athorization :Bearer XXXXX" -H "Hawkular-Tenant:openshift-infra" -X GET hawkular-metrics.example.com/hawkular/metrics/metics Showing error :could not resolve host:hawkular-metrics.example.com,unknown error. for deploying metrics and accessing metrics should I need to any thing extra for this version? Thanks in advance
With respect to the issue I reported earlier: "openshift_service_catalog : wait for api server to be ready" I solved this by adding "options ndots:3" to /etc/resolv.conf on my host. The clue was that dns requests ending in *.cluster.local were properly resolving but dns requests without cluster.local were resolving to external ip addresses. For example: docker-registry.default.svc resolved to 92.242.140.2 which is clearly incorrect. docker-registry.default.svc.cluster.local correctly resolved. Adding "options ndots:3" to the /etc/resolv.conf corrected the issue. Be aware that /etc/NetworkManager/dispatcher.d/99-origin-dns.sh may overwrite the resolve.conf change on a reboot.
Not quite. The issue is caused by some of the internal requests for services not appending cluster.local to the service URL. For example, I saw calls to "docker-registry.default.svc" which were not resolving the correct address. The calls did not resolve properly because the DNS implementation on the host was assuming that the URL was calling an absolute host name and therefore did not search the "cluster.local" domain before going to the external DNS provider. Adding the line with "options ndots:3" to your /etc/resolv.conf tells the DNS provider to hit the indicated search domains for any query with up to 3 dots in the hostname. This forces the DNS provider to search "cluster.local" for docker-registry.default.svc by appending appropriately and resolving to docker-registry.default.svc.cluster.local. If you hard code the specific hosts to your /etc/hosts or resolv.conf, you won't necessarily fix all of the possible issues. I'm not even sure that "options ndots:3" is sufficient. It might need to be 4 or 5. This is probably a configuration bug that needs to get straightened out in the ansible playbooks. The last thing to note is that the script: /etc/NetworkManager/dispatcher.d/99-origin-dns.sh will overwrite your changes to /etc/resolv.conf if you don't modify the script. I'll post the modification that I made in the morning when I can get access to my server. Hope this helps.
Here is my resolv.conf: ************************************************************* # nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh # Generated by NetworkManager options ndots:3 nameserver search cluster.local ************************************************************* Here is a snippet from /etc/NetworkManager/dispatcher.d/99-origin-dns.sh where I modified: ... # Only if dnsmasq is running properly make it our only nameserver and place # a watermark on /etc/resolv.conf if `systemctl -q is-active dnsmasq.service`; then if ! grep -q '99-origin-dns.sh' /etc/resolv.conf; then echo "# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh" >> ${NEW_RESOLV_CONF} fi sed -e '/^nameserver.*$/d' /etc/resolv.conf >> ${NEW_RESOLV_CONF} echo "options ndots:3" >> ${NEW_RESOLV_CONF} echo "nameserver "${def_route_ip}"" >> ${NEW_RESOLV_CONF} if ! grep -qw search ${NEW_RESOLV_CONF}; then ... As you can see, I just added: "echo "options ndots:3" >> ${NEW_RESOLV_CONF}" to ensure that the options line is preserved across restarts.
Hello, I am trying to install OpenShift origin cluster with 1 master VM and another node VM. I have seen other videos also, where in inventory file "containerized=true" variable is mentioned and later while running playbooks, normal commands used for RPM installer are used. If we set containerized=true in inventory doesn't that mean that we need containerized implementation of services? And then for that either system-container or docker container installer should be used. Please anyone can clarify my understanding? Thank you.
Thanks Shipley this is very helpful, makes providing demos on container applications lot easier, but when i restart the system i need to re-setup every thing, can u please provide me some basic instructions on how to start and stop the openshift
Awesome video, all in one and easy to follow. I'm curious why OS 3.7.1 use old docker from centos7 repo which is not latest docker version? On AWS centos I also need to add to installation script, (as ansible didn't recognise IP, don't know why): echo $IP > /etc/ansible/hosts
please your help, I got this error: error: dial tcp 192.168.200.232:8443: connect: connection refused - verify you have provided the correct host and port and that the server is currently running ...... What can be?
This is great, Grant. I will use this for internal demo purposes. A few questions, though. 1) Can Certbot replace the self-signed default certs in OpenShift? 2) How do we install the AWS Service Broker?
Grant Shipley Sorry - I should have been more specific in my question. Will Certbot replace the Master console cert and update the OpenShift Master.yaml file or must that be done by hand or an Ansible playbook? It would be great to see the AWS service broker included.
Hello , your video is amazing, just one question : how can create a domain? is it via internet (buy domain or create it for free) or just a network configuration on my server ? thanks in advance :)
30 minutes? I've been trying to accomplish this for 2 days! ( and I have 20 years experience with Linux) mainly due to problems not due directly to openshift oh, but rather the hell of nested virtualization ;) Question: is the repository and built-in images installed and delivered by default? My install finishes okay, but whenever I try to deploy any image like Perl or python+Django, I get an HTTP 404. Any ideas?
I just started knowing openshift and my requirement is to establish OpenShift Origin on one server initially and then extend to other server after couple of months. While searching i found OpenShift All-in-One Server, i want to know do your provided video will work for this scenario too? As on ansible i saw multiple projects like byo
AFAIK if you don't deploy gluster during installation, then if you want to deploy persistent applicatons, then you need to manually create persistent volumes after ansible is finished. PersistentVolume is an object like any other in Openshift/Kubernetes so it can be created using oc CLI (i use yml to define those, it makes things a bit easier).
If that's the case, then the VM doesn't really need to be 100 GBs in size. If I understand things correctly, OpenShift cleans up old Docker images. It would be nice to have the Persist Storage added in the install.
Check if the domain you provided is resolvable from inside virtual machine. This error occurs when the service catalog tries to contact with etcd on your openshift host, it tries to do this by requesting openshift by hostname - it fails if it is not resolvable.
Arkaprovo Bhattacharjee and like I said, this problem occurs when service catalog api container can't reach etcd. It tries to reach it by external domain, so you need to check why it can't do this.
Arkaprovo Bhattacharjee in my case it was the same url that openshift has, but with port 2379. Best way in my case was to find misbehaving container from VM shell and mess around using 'docker exec -ti ... sh'. From inside you can try to ping external domain.
I like the idea of this script, but there are a few things that are hard-coded that break it if you try to use it the way I would want to use a script. For instance, I should be able to replace 3.7.1 with 3.9.0 for the version of OpenShift, but I get version failures from OpenShift-Ansible. And I had to install ansible myself before I could get the script to run.
This is an excellent tutorial. However, my install is hanging with the message: "openshift_service_catalog : wait for api server to be ready". Any advice?
Same problem here, fixed it by creating DNS records specific for "docker-registry-default.apps."+[your domain], "registry-console-default.apps."+[your domain] and "hawkular-metrics.apps."+[your domain]. In the video it seems to work because any subdomain resolves to the same IP, there is a wildcard subdomain defined.
i figured out you can modify by unix.stackexchange.com/questions/128220/how-do-i-set-my-dns-when-resolv-conf-is-being-overwritten but i need to know how to identify my domain
See my reply to my last post. I think you just need to add "options ndots:3" to /etc/resolv.conf and then modify /etc/NetworkManager/dispatcher.d/99-origin-dns.sh to retain the change. I'll post my modification to /etc/NetworkManager/dispatcher.d/99-origin-dns.sh in the morning.
Hi, Thanks great video that got me up and running with 3.9 . I hit an issue with my ISP due to the fact that it dynamically changes its I.P reasonably frequently . So I perform the setup and everything works and I am able to deploy the PHP app in the video . Next day the I.P changes and I cannot deploy via OpenShift as it can no longer find the Docker repo, it seems . That's even in the case of the small PHP app. Anyone any tips on how to change OpenShift config to cater for this sceanrio. Thanks all.
For me, this was frustrating, I have a slow internet connection and it has taken 15 minutes to realise that this guy simply ran a script. That was completely pointless
Grant, thanks for the video. I have followed the instructions and everything goes ok up to the point of exposing the simplephp service. I can access openshift console on console.mydomain.com:8443 But I can not access the service at simplephp-grantproject.apps.mydomain.com Any Ideas on how to go about fixing it? Extra info: My DNS records are similar to the ones in the video(gandi.net) but with my own public ip. When I am logged onto the master server I can reach the service with the command curl podIpForTheSimplePhpServer:8080 when running oc get services simplephp I get NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE simplephp ClusterIP 172.30.xx.xx 8080/TCP 2h Thanks.
Fixed it by adding a wildcard on my DNS for the apps route. Name Type TTL Value *.apps A 1800 xx.xx.xx.xx(public ip) Initially I had a CName instead of an A type
Thanks for the video, this should help devs alot. But for us admins even more interesting would be installing a full BYO setup with masters/infra/nodes in multiple virtual machines so we can simulate a full fledged cluster.
i am getting an error line 186 oc command not found ... what would be the issue ?
Many thanks. Finally up and running.
This video is very much helpful to me.I have one question-
I have install openshift origin 3.9 using inventory file like you:
I have used below line for metrics installation :
openshift_metrics_install_metrics=true
openshift_metrics_hawkuler_hostname=hawkular-metrics.example.com
openshift_master_metrics_public_url=hawkular-metrics.example.com/hawkular/metrics
And I installed using inventory file with prerequisites.yaml and then deploy_cluster.yaml ,so that hawker-cassandra,hawkular-metrics and heapster in running condition and oc adm top node command is working.
but Problem is cannot access hawkular metrics by below command.
curl -H "Athorization :Bearer XXXXX" -H "Hawkular-Tenant:openshift-infra" -X GET hawkular-metrics.example.com/hawkular/metrics/metics
Showing error :could not resolve host:hawkular-metrics.example.com,unknown error.
for deploying metrics and accessing metrics should I need to any thing extra for this version?
Thanks in advance
With respect to the issue I reported earlier: "openshift_service_catalog : wait for api server to be ready"
I solved this by adding "options ndots:3" to /etc/resolv.conf on my host. The clue was that dns requests ending in *.cluster.local were properly resolving but dns requests without cluster.local were resolving to external ip addresses. For example: docker-registry.default.svc resolved to 92.242.140.2 which is clearly incorrect. docker-registry.default.svc.cluster.local correctly resolved. Adding "options ndots:3" to the /etc/resolv.conf corrected the issue. Be aware that /etc/NetworkManager/dispatcher.d/99-origin-dns.sh may overwrite the resolve.conf change on a reboot.
i'm experiencing the same issue
i guess you mean docker-registry.default.svc.cluster.local docker-registry needs to be replaced with [your domain].default.svc.cluster.local?
Not quite. The issue is caused by some of the internal requests for services not appending cluster.local to the service URL. For example, I saw calls to "docker-registry.default.svc" which were not resolving the correct address. The calls did not resolve properly because the DNS implementation on the host was assuming that the URL was calling an absolute host name and therefore did not search the "cluster.local" domain before going to the external DNS provider. Adding the line with "options ndots:3" to your /etc/resolv.conf tells the DNS provider to hit the indicated search domains for any query with up to 3 dots in the hostname. This forces the DNS provider to search "cluster.local" for docker-registry.default.svc by appending appropriately and resolving to docker-registry.default.svc.cluster.local. If you hard code the specific hosts to your /etc/hosts or resolv.conf, you won't necessarily fix all of the possible issues. I'm not even sure that "options ndots:3" is sufficient. It might need to be 4 or 5. This is probably a configuration bug that needs to get straightened out in the ansible playbooks.
The last thing to note is that the script: /etc/NetworkManager/dispatcher.d/99-origin-dns.sh will overwrite your changes to /etc/resolv.conf if you don't modify the script. I'll post the modification that I made in the morning when I can get access to my server.
Hope this helps.
thank so much i hope to see a proper set up :)
Here is my resolv.conf:
*************************************************************
# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh
# Generated by NetworkManager
options ndots:3
nameserver
search cluster.local
*************************************************************
Here is a snippet from /etc/NetworkManager/dispatcher.d/99-origin-dns.sh where I modified:
...
# Only if dnsmasq is running properly make it our only nameserver and place
# a watermark on /etc/resolv.conf
if `systemctl -q is-active dnsmasq.service`; then
if ! grep -q '99-origin-dns.sh' /etc/resolv.conf; then
echo "# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh" >> ${NEW_RESOLV_CONF}
fi
sed -e '/^nameserver.*$/d' /etc/resolv.conf >> ${NEW_RESOLV_CONF}
echo "options ndots:3" >> ${NEW_RESOLV_CONF}
echo "nameserver "${def_route_ip}"" >> ${NEW_RESOLV_CONF}
if ! grep -qw search ${NEW_RESOLV_CONF}; then
...
As you can see, I just added: "echo "options ndots:3" >> ${NEW_RESOLV_CONF}" to ensure that the options line is preserved across restarts.
Hello,
I am trying to install OpenShift origin cluster with 1 master VM and another node VM.
I have seen other videos also, where in inventory file "containerized=true" variable is mentioned and later while running playbooks, normal commands used for RPM installer are used. If we set containerized=true in inventory doesn't that mean that we need containerized implementation of services? And then for that either system-container or docker container installer should be used.
Please anyone can clarify my understanding?
Thank you.
Thanks for sharing, What's your terminal tool name ?
Thanks Shipley this is very helpful, makes providing demos on container applications lot easier, but when i restart the system i need to re-setup every thing, can u please provide me some basic instructions on how to start and stop the openshift
Awesome video, all in one and easy to follow.
I'm curious why OS 3.7.1 use old docker from centos7 repo which is not latest docker version?
On AWS centos I also need to add to installation script, (as ansible didn't recognise IP, don't know why):
echo $IP > /etc/ansible/hosts
Its really nice video and I verified it is 100% working :) thanks
Excellent video, but what if I want to install it manually instead of ur script? Got any video links on that pls?
had to switch to *Minishift* installing this is a pain in the ass. especially if you're new to Linux it self.
OUTDATED!
when running command ansible-playbook -i, the config.yml file does not exist. When I select it from /olm/config.yml, the installation fails.
are there any video of configuring to use external private Docker registry instead of local and public?
I can use this on my own hardware instead of using RedHat's OpenShift servers? For development, production or both?
please your help, I got this error: error: dial tcp 192.168.200.232:8443: connect: connection refused - verify you have provided the correct host and port and that the server is currently running ...... What can be?
I'm getting below error :
Login using:
*
$ oc login -u user1 -p user1 console.sgt.com:8443/
******
./install-openshift.sh: line 104: oc: command not found
Can be installed OpenShift inside Dockerfile, running instances of OpenShift with Docker?
This is great, Grant. I will use this for internal demo purposes. A few questions, though. 1) Can Certbot replace the self-signed default certs in OpenShift? 2) How do we install the AWS Service Broker?
Yes, you can use certbot to replace the certs.
On the AWS Service Broker, I am not sure as I haven't done it myself yet.
Grant Shipley Sorry - I should have been more specific in my question. Will Certbot replace the Master console cert and update the OpenShift Master.yaml file or must that be done by hand or an Ansible playbook? It would be great to see the AWS service broker included.
Oh, it would be a manual process where you would modify the inventory file.
How much RAM does your PC have? Is it really necessary for OpenShift to have 16GB RAM for CentOS VM?
He says right before assigning it 16..."I have 64 on this machine so I'm going to give it 16" .... were you watching this on mute?
Thanks for your videos, it's a great tutorial :)
any plans to integrate with Prometheus for metrics and monitoring?
Hello , your video is amazing, just one question : how can create a domain? is it via internet (buy domain or create it for free) or just a network configuration on my server ? thanks in advance :)
30 minutes? I've been trying to accomplish this for 2 days! ( and I have 20 years experience with Linux) mainly due to problems not due directly to openshift oh, but rather the hell of nested virtualization ;) Question: is the repository and built-in images installed and delivered by default? My install finishes okay, but whenever I try to deploy any image like Perl or python+Django, I get an HTTP 404. Any ideas?
Hello, I got that error: failed - retrying wait for control plane pods to appear. It tries it 60 times. But, all tries got error.
I just started knowing openshift and my requirement is to establish OpenShift Origin on one server initially and then extend to other server after couple of months.
While searching i found OpenShift All-in-One Server, i want to know do your provided video will work for this scenario too? As on ansible i saw multiple projects like byo
very helpful!. I followed your video, and everything was ok. I restarted the server and are missing plugins (eg django etc.) ... where did I go wrong?
Do you have openshift 3.7 ansible host preparaton script? Can you create same video for Cluster?
Can you note the git repository in the video description, please? Nice video!
github.com/gshipley/installcentos
how to stop & start the openshift,can you please add the instructions
Thanks for sharing .
It doesn't seem like any persist volumes are present. Is this supposed to be the case?
I think it is, simplest way to achieve persistent volumes is to use hostPath, it is a single host installation so that's sufficient.
therealmikz I redeployed a cluster and I can’t deploy anything with persistent storage
AFAIK if you don't deploy gluster during installation, then if you want to deploy persistent applicatons, then you need to manually create persistent volumes after ansible is finished. PersistentVolume is an object like any other in Openshift/Kubernetes so it can be created using oc CLI (i use yml to define those, it makes things a bit easier).
If that's the case, then the VM doesn't really need to be 100 GBs in size. If I understand things correctly, OpenShift cleans up old Docker images. It would be nice to have the Persist Storage added in the install.
Ryan Nix who said it needs to be 100 gb?
When i reboot my system the site is not working
everything went well for me except "wait for api server to be ready" part there was an error with the following message
Check if the domain you provided is resolvable from inside virtual machine. This error occurs when the service catalog tries to contact with etcd on your openshift host, it tries to do this by requesting openshift by hostname - it fails if it is not resolvable.
that part is over, now a different problem like I have mentioned
Arkaprovo Bhattacharjee and like I said, this problem occurs when service catalog api container can't reach etcd. It tries to reach it by external domain, so you need to check why it can't do this.
how do I know the etcd url? is there any way to find out same?
Arkaprovo Bhattacharjee in my case it was the same url that openshift has, but with port 2379. Best way in my case was to find misbehaving container from VM shell and mess around using 'docker exec -ti ... sh'. From inside you can try to ping external domain.
I like the idea of this script, but there are a few things that are hard-coded that break it if you try to use it the way I would want to use a script. For instance, I should be able to replace 3.7.1 with 3.9.0 for the version of OpenShift, but I get version failures from OpenShift-Ansible. And I had to install ansible myself before I could get the script to run.
This is an excellent tutorial. However, my install is hanging with the message: "openshift_service_catalog : wait for api server to be ready". Any advice?
is your server sitting behind a proxy by any chance?
Same problem here, fixed it by creating DNS records specific for "docker-registry-default.apps."+[your domain], "registry-console-default.apps."+[your domain] and "hawkular-metrics.apps."+[your domain]. In the video it seems to work because any subdomain resolves to the same IP, there is a wildcard subdomain defined.
Thanks!
i figured out you can modify by unix.stackexchange.com/questions/128220/how-do-i-set-my-dns-when-resolv-conf-is-being-overwritten
but i need to know how to identify my domain
See my reply to my last post. I think you just need to add "options ndots:3" to /etc/resolv.conf and then modify /etc/NetworkManager/dispatcher.d/99-origin-dns.sh to retain the change. I'll post my modification to /etc/NetworkManager/dispatcher.d/99-origin-dns.sh in the morning.
I am getting "bash: oc: command not found..." error
getting the same too
Getting the same, I'm running version 3.10.0
The real installation starts at 1107 min
You should give the information: "Installing OpenShift Origin" and the keyword "Master-Node"
will it work for 3.9 github.com/openshift/origin/tree/release-3.9 ?
Big THX!
Hello evryone, I have this error : ERROR! Unexpected Exception, this is probably a bug: 'module' object has no attribute 'SSL_ST_INIT'
Hi, Thanks great video that got me up and running with 3.9 . I hit an issue with my ISP due to the fact that it dynamically changes its I.P reasonably frequently . So I perform the setup and everything works and I am able to deploy the PHP app in the video . Next day the I.P changes and I cannot deploy via OpenShift as it can no longer find the Docker repo, it seems . That's even in the case of the small PHP app. Anyone any tips on how to change OpenShift config to cater for this sceanrio. Thanks all.
Over 800 issues on github, good luck valent installers
Not so clear to understand
For me, this was frustrating, I have a slow internet connection and it has taken 15 minutes to realise that this guy simply ran a script. That was completely pointless
Better make a new video with clear fonts
Grant, thanks for the video.
I have followed the instructions and everything goes ok up to the point of exposing the simplephp service.
I can access openshift console on console.mydomain.com:8443
But I can not access the service at simplephp-grantproject.apps.mydomain.com
Any Ideas on how to go about fixing it?
Extra info:
My DNS records are similar to the ones in the video(gandi.net) but with my own public ip.
When I am logged onto the master server I can reach the service with the command curl podIpForTheSimplePhpServer:8080
when running oc get services simplephp I get
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
simplephp ClusterIP 172.30.xx.xx 8080/TCP 2h
Thanks.
Fixed it by adding a wildcard on my DNS for the apps route.
Name Type TTL Value
*.apps A 1800 xx.xx.xx.xx(public ip)
Initially I had a CName instead of an A type
Useless --- waste of my time
This definitely did not work