Re: How to use DNS hostname of OpenShift on AWS
Hi Joel, kubernetes is using the AWS inventory information directly as soon as it detects the AWS cloud. Until now I did not find any solution to get to nice hostnames. Instead we label the "nice name" as "host" (oc label node host=abc) and use "oc get node -L host" to get the names listed. 2018-02-21 13:13 GMT+01:00 Joel Pearson: > Hi, > > I'm trying to figure out how to use the DNS hostname when deploying > OpenShift on AWS using https://github.com/openshift/openshift-ansible- > contrib/tree/master/reference-architecture/aws-ansible Currently it uses > private dns name, eg, ip-10-2-7-121.ap-southeast-2.compute.internal but > that isn't too useful a name for me. I've managed to set the hostname on > the ec2 instance properly but disabling the relevant cloud-init setting, > but it still grabs the private dns name somehow. > > I tried adding "openshift_hostname" to be the same as "name" on this line: > https://github.com/openshift/openshift-ansible- > contrib/blob/master/reference-architecture/aws-ansible/ > playbooks/roles/instance-groups/tasks/main.yaml#L11 > > Which did set the hostname in the node-config.yaml, but then when running > "oc get nodes" it still returned the private dns name somehow, and > installation failed waiting for the nodes to start properly, I guess a > mismatch between node names somewhere. > > I found an old github issue, but it's all referring to files in ansible > that exist no longer: > https://github.com/openshift/openshift-ansible/issues/1170 > > Even on OpenShift Online Starter, they're using the default ec2 names, > eg: ip-172-31-28-11.ca-central-1.compute.internal, which isn't a good > sign I guess. > > Has anyone successfully used a DNS name for OpenShift on AWS? > > Thanks, > > Joel > > ___ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > -- Mit freundlichen Grüßen / Kind Regards, Roland T. Lichti Red Hat Ambassador | Senior Middleware Consultant Red Hat GmbH Technopark II Werner-von-Siemens-Ring 14, 85630 Grasbrunn rlic...@redhat.com M: +49-172-6328604 www.redhat.com | TRIED. TESTED. TRUSTED. | redhat.com/trusted Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
Re: How to use DNS hostname of OpenShift on AWS
Michael are you running OpenShift on AWS? https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/aws-ansible is the AWS reference architecture and it does use openshift-ansible once the infrastructure is built, but it uses a dynamic inventory. It’s not an option for us not to use the aws reference architecture to install OpenShift as it would be rather painful as we’re relying heavily on cloud formation and the dynamic inventory. While ansible is running the hostnames are correct, so I’m suspecting that maybe OpenShift itself is detecting the cloud provider and overriding the hostname or maybe the ansible playbook is doing something similar. Inside the ansible openshift_facts python library I saw some custom hostname handling for Google Cloud, but not for AWS, but it made me suspicious thinking it might be hiding somewhere else. On Wed, 21 Feb 2018 at 11:38 pm, Feld, Michael (IMS)wrote: > Deploying with https://github.com/openshift/openshift-ansible you can > define the hostnames in your inventory file. There is a sample inventory > file at > https://docs.openshift.org/latest/install_config/install/advanced_install.html > that shows how to define the master/etcd/nodes, and those names should be > used as the hostnames in the cluster. > > > > *From:* users-boun...@lists.openshift.redhat.com [mailto: > users-boun...@lists.openshift.redhat.com] *On Behalf Of *Joel Pearson > *Sent:* Wednesday, February 21, 2018 7:14 AM > *To:* users > *Subject:* How to use DNS hostname of OpenShift on AWS > > > > Hi, > > > > I'm trying to figure out how to use the DNS hostname when deploying > OpenShift on AWS using > https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/aws-ansible > Currently > it uses private dns name, eg, ip-10-2-7-121.ap-southeast-2.compute.internal > but that isn't too useful a name for me. I've managed to set the hostname > on the ec2 instance properly but disabling the relevant cloud-init setting, > but it still grabs the private dns name somehow. > > > > I tried adding "openshift_hostname" to be the same as "name" on this line: > https://github.com/openshift/openshift-ansible-contrib/blob/master/reference-architecture/aws-ansible/playbooks/roles/instance-groups/tasks/main.yaml#L11 > > > > Which did set the hostname in the node-config.yaml, but then when running > "oc get nodes" it still returned the private dns name somehow, and > installation failed waiting for the nodes to start properly, I guess a > mismatch between node names somewhere. > > > > I found an old github issue, but it's all referring to files in ansible > that exist no longer: > > https://github.com/openshift/openshift-ansible/issues/1170 > > > > Even on OpenShift Online Starter, they're using the default ec2 names, > eg: ip-172-31-28-11.ca-central-1.compute.internal, which isn't a good sign > I guess. > > > > Has anyone successfully used a DNS name for OpenShift on AWS? > > > > Thanks, > > > > Joel > > -- > > Information in this e-mail may be confidential. It is intended only for > the addressee(s) identified above. If you are not the addressee(s), or an > employee or agent of the addressee(s), please note that any dissemination, > distribution, or copying of this communication is strictly prohibited. If > you have received this e-mail in error, please notify the sender of the > error. > ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
RE: How to use DNS hostname of OpenShift on AWS
Deploying with https://github.com/openshift/openshift-ansible you can define the hostnames in your inventory file. There is a sample inventory file at https://docs.openshift.org/latest/install_config/install/advanced_install.html that shows how to define the master/etcd/nodes, and those names should be used as the hostnames in the cluster. From: users-boun...@lists.openshift.redhat.com [mailto:users-boun...@lists.openshift.redhat.com] On Behalf Of Joel Pearson Sent: Wednesday, February 21, 2018 7:14 AM To: usersSubject: How to use DNS hostname of OpenShift on AWS Hi, I'm trying to figure out how to use the DNS hostname when deploying OpenShift on AWS using https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/aws-ansible Currently it uses private dns name, eg, ip-10-2-7-121.ap-southeast-2.compute.internal but that isn't too useful a name for me. I've managed to set the hostname on the ec2 instance properly but disabling the relevant cloud-init setting, but it still grabs the private dns name somehow. I tried adding "openshift_hostname" to be the same as "name" on this line: https://github.com/openshift/openshift-ansible-contrib/blob/master/reference-architecture/aws-ansible/playbooks/roles/instance-groups/tasks/main.yaml#L11 Which did set the hostname in the node-config.yaml, but then when running "oc get nodes" it still returned the private dns name somehow, and installation failed waiting for the nodes to start properly, I guess a mismatch between node names somewhere. I found an old github issue, but it's all referring to files in ansible that exist no longer: https://github.com/openshift/openshift-ansible/issues/1170 Even on OpenShift Online Starter, they're using the default ec2 names, eg: ip-172-31-28-11.ca-central-1.compute.internal, which isn't a good sign I guess. Has anyone successfully used a DNS name for OpenShift on AWS? Thanks, Joel Information in this e-mail may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error. ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
How to use DNS hostname of OpenShift on AWS
Hi, I'm trying to figure out how to use the DNS hostname when deploying OpenShift on AWS using https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/aws-ansible Currently it uses private dns name, eg, ip-10-2-7-121.ap-southeast-2.compute.internal but that isn't too useful a name for me. I've managed to set the hostname on the ec2 instance properly but disabling the relevant cloud-init setting, but it still grabs the private dns name somehow. I tried adding "openshift_hostname" to be the same as "name" on this line: https://github.com/openshift/openshift-ansible-contrib/blob/master/reference-architecture/aws-ansible/playbooks/roles/instance-groups/tasks/main.yaml#L11 Which did set the hostname in the node-config.yaml, but then when running "oc get nodes" it still returned the private dns name somehow, and installation failed waiting for the nodes to start properly, I guess a mismatch between node names somewhere. I found an old github issue, but it's all referring to files in ansible that exist no longer: https://github.com/openshift/openshift-ansible/issues/1170 Even on OpenShift Online Starter, they're using the default ec2 names, eg: ip-172-31-28-11.ca-central-1.compute.internal, which isn't a good sign I guess. Has anyone successfully used a DNS name for OpenShift on AWS? Thanks, Joel ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users