#4 fix steps of cico client adding
Merged 3 years ago by mobrien. Opened 3 years ago by siddharthvipul1.
centos/ siddharthvipul1/centos-infra-docs master  into  master

@@ -89,22 +89,13 @@ 

  

  ## Steps to create a new duffy API key

  

- 1. How do we connect to instances

+ 1. The Duffy database runs on the admin.ci node: `ssh admin.ci.centos.org` and once in the admin node, login in mysql - duffy db

  

- The Duffy database runs on the admin.ci node: `ssh admin.ci.centos.org`.

+ 2. Create user in usertable `insert into users values(UUID(), 'projectname', 'projectname', NOW(), 5);`

  

- 2. We have a script which does this work.. how do we use it

+ 3. Retrieve the api key from the users table ` select * from users where projectname="projectname";` Copy the API key somewhere handy (we will need it)

  

- 3. Create user in usertable

- `insert into users values(UUID(), 'projectname', 'projectname', NOW(), 5);`

- 

- 4. Retrieve the api key from the users table

- ` select * from users where projectname="projectname";`

- Copy the API key somewhere handy (we will need it)

- 

- 5. Using that api-key/UUID as project_id, enter ssh key of a user from the project so that they can ssh into the machines. This process must be repeated for every user we wish to add access to via SSH.

- `insert into userkeys (`project_id`,`key`) values('<project-UUID>', '<ssh-key>');`

- This ssh key is pushed to duffy nodes - authorized keys when a tenant requests the node through api key.

+ 4. Using that api-key/UUID as project_id, enter ssh key of a user from the project so that they can ssh into the machines. This process must be repeated for every user we wish to add access to via SSH.  `insert into userkeys (project_id,key) values(<project-UUID-var>, <ssh-key-var>);` This ssh key is pushed to duffy nodes - authorized keys when a tenant requests the node through api key.

  

  NOTE: we need to copy private key (pair of key just added in db), and paste it

  in openshift jenkins template (so copy it to save the trouble later)

Pull-Request has been merged by mobrien

3 years ago