- OpenShift Cookbook
- Shekhar Gulati
- 458字
- 2021-08-05 17:37:39
Adding an editor member to a domain using rhc
Imagine that you are leading a software development team that uses OpenShift for development. During development, you would like all the developers in your team to be able to create, delete, push, or even SSH into application gear. However, you would not want users to rename or delete a domain, as this might impact other developers in your team or other teams. Another thing you would not like is to allow developers to change gear sizes. You can restrict development domains to only use small gears to save money. In this scenario, you will give developers an editor role that gives them the freedom to work with applications but not domains.
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.
You will need two OpenShift accounts to work through this recipe. Please refer to the Creating an OpenShift online account recipe in Chapter 1, Getting Started with OpenShift, for OpenShift account registration instructions.
How to do it…
To add the openshift.cookbook.test@gmail.com
user as an editor to the devosbook
domain of openshift.cookbook@gmail.com
, run the following command:
$ rhc add-member openshift.cookbook.test@gmail.com --namespace devosbook --role edit
How it works…
The edit role allows a user to perform the following actions on a domain:
- A user can create applications under the domain
- A user can delete applications under the domain
- A user can view logs of the application
- A user can perform other application-related actions such as start, stop, and restart
- A user can push the source code using Git
- A user can SSH into the application gear using SSH
When you run the rhc add-member
command with the edit role, OpenShift will firstly add a new member to a domain with an edit role and then copy the user public SSH key to the OpenShift gear ~/.ssh/authorized_keys
file. This allows an editor to perform SSH-related operations such as code deployment using Git and SSH to the application gear.
To check whether the editor has been added successfully, you can view the domain details:
$ rhc show-domain Domain devosbook (owned by openshift.cookbook@gmail.com) ----------------------------------------------------- Created: Jan 14 9:49 AM Allowed Gear Sizes: small Members: openshift.cookbook.test@gmail.com (edit)
There's more…
You can also use the web console to add the editor to your application. Just follow the steps mentioned in the Adding viewer members to a domain using rhc recipe in this chapter.
See also
- The Adding viewer members to a domain using rhc recipe
- The Adding an admin member to a domain using rhc recipe
- The Viewing all the members in a domain using rhc recipe
- 社交網絡對齊
- 物聯網安全(原書第2版)
- 物聯網之魂:物聯網協議與物聯網操作系統
- Learning QGIS 2.0
- Force.com Development Blueprints
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 計算機網絡工程實用教程(第2版)
- 區塊鏈輕松上手:原理、源碼、搭建與應用
- 網絡環境中基于用戶視角的信息質量評價研究
- 轉化:提升網站流量和轉化率的技巧
- Implementing NetScaler VPX?
- 5G時代的大數據技術架構和關鍵技術詳解
- Laravel Application Development Cookbook
- INSTANT Social Media Marketing with HootSuite
- 無線傳感器網絡定位方法及應用