官术网_书友最值得收藏!

  • OpenShift Cookbook
  • Shekhar Gulati
  • 326字
  • 2021-08-05 17:37:39

Renaming a domain using rhc

Following the creation of a domain, you might need to rename it. Let's suppose you want to rename your existing name to reflect its environment. For instance, you may rename the osbook domain name to devosbook in order to indicate devosbook as your development environment.

Getting ready

To complete this recipe, you will need to have rhc installed on your machine. Please refer to the Installing the OpenShift rhc command-line client recipe in Chapter 1, Getting Started with OpenShift, for instructions.

How to do it…

To rename a domain, open a new command-line terminal and run the following command. You should provide a unique, new domain name:

$ rhc rename-domain <old_domain_name> <new_domain_name>

How it works…

To rename a domain, you have to first make sure there are no applications associated with it. If there are any applications associated with a domain, you have to first delete them. To learn how to delete an application, refer to the Deleting the application recipe in Chapter 3, Creating and Managing Applications. The rename-domain command first deletes the old domain before creating a new one using the new domain name. To rename the osbook domain to devosbook, you need to run the following command:

$ rhc domain-rename osbook devosbook
Renaming domain 'osbook' to 'devosbook' ... done

There's more…

You can also rename a domain using the web console. Visit your domain web page at https://openshift.redhat.com/app/console/domain/{domain-name} and click on Change, as shown in the following screenshot. Please replace {domain-name} with your OpenShift account domain name.

This will direct you to another web page where you can enter the new domain name, as seen in the following screenshot. Enter the new domain name and click on Save.

See also

  • The Creating OpenShift domains using the web console recipe in Chapter 1, Getting Started with OpenShift
  • The Renaming a domain using rhc recipe
  • The Viewing domain details using rhc recipe
  • The Deleting a domain using rhc recipe
主站蜘蛛池模板: 北辰区| 桃江县| 浙江省| 拉萨市| 观塘区| 铁力市| 资溪县| 大荔县| 碌曲县| 绍兴市| 桑植县| 民权县| 呼和浩特市| 新蔡县| 疏附县| 青冈县| 大同县| 茶陵县| 南通市| 濉溪县| 勃利县| 宁河县| 柳江县| 德化县| 马公市| 双牌县| 东乌珠穆沁旗| 上犹县| 平谷区| 金溪县| 那曲县| 锦州市| 集贤县| 文昌市| 博野县| 江津市| 巨鹿县| 隆回县| 夏河县| 辽宁省| 莱阳市|