User Tools

Site Tools


services:cobbler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
services:cobbler [2017/11/30 16:01]
djgalloway
services:cobbler [2019/08/21 13:39]
djgalloway
Line 9: Line 9:
  
 ===== Creating a new user for Web UI access ===== ===== Creating a new user for Web UI access =====
-  - Generate a random password (''​mkpasswd ​-l 12''​+  - In the ''​ceph-cm-ansible'' ​repo, there is a ''​tools/cobbler-access.sh'' ​script. ​ Run it. 
-  - Generate the hashed password (''​%%htdigest -c /tmp/users.digest "​Cobbler"​ $username%%''​+  - Create a new branch named ''​wip-username''​ in the ''​ceph-sepia-secrets'' ​repo 
-    - Paste the generated password when prompted +  - Paste the output ​under ''​%%------ String for cobbler.yml ------%%''​ into a new line in ''​ansible/​inventory/​group_vars/​cobbler.yml''​ under ''​users_digest_lines''​ 
-  - Create a new branch named ''​wip-username''​ in the secrets repo +  - git commit, git push the branch, and create a Pull Request
-  - Paste the output ​of ''​cat /tmp/users.digest''​ into a new line in ''​ansible/​inventory/​group_vars/​cobbler.yml''​ under ''​users_digest_lines''​ +
-  - git commit, git push the branch, and create a PR+
   - ''​%%ansible-playbook cobbler.yml --tags="​settings"​%%''​   - ''​%%ansible-playbook cobbler.yml --tags="​settings"​%%''​
  
 <​code>​ <​code>​
 # Example # Example
-mkpasswd ​-l 12 +~/​git/​ceph/​ceph-cm-ansible/​tools/​cobbler-access.sh ​ 
-b39feiiSiuQ%+Enter username: bob
  
-$ htdigest ​-c /​tmp/​users.digest "​Cobbler"​ bob +------ String ​for cobbler.yml ------ 
-Adding password ​for bob in realm Cobbler+bob:Cobbler:07a95ca759fd46e9416de672a5e2bb60
-New password +
-Re-type new password+
  
-$ cat /​tmp/​users.digest ​ 
-bob:​Cobbler:​027abc2039e7495f72128d9c3c628686 
  
 # Add the user to the cobbler.yml secrets group_vars file # Add the user to the cobbler.yml secrets group_vars file
Line 40: Line 34:
   - "​vasu:​Cobbler:​XXXXX"​   - "​vasu:​Cobbler:​XXXXX"​
   - "​dmick:​Cobbler:​XXXXX"​   - "​dmick:​Cobbler:​XXXXX"​
-+ - "​bob:​Cobbler:​027abc2039e7495f72128d9c3c628686"++ - "​bob:​Cobbler:​07a95ca759fd46e9416de672a5e2bb60"
 </​code>​ </​code>​
  
Line 56: Line 50:
     - Set **Parent Profile** to ''​$NEW_DISTRO_NAME''​     - Set **Parent Profile** to ''​$NEW_DISTRO_NAME''​
     - **Save**     - **Save**
 +
 +==== RHEL in Sepia ====
 +Because RHEL ISOs are only available inside the Red Hat firewall, we can't add an ''​http''​ URL to the secrets repo.  To add a RHEL version:
 +
 +  - Find the ISO hosted inside the Red Hat firewall and download it
 +  - Once downloaded, ''​scp''​ the ISO to ''​cobbler.front.sepia.ceph.com:/​iso''​
 +  - In the ceph-sepia-secrets repo, set the appropriate ''​%%file:///​iso/​path%%''​
  
 ==== Error adding brand new distro ==== ==== Error adding brand new distro ====
Line 66: Line 67:
   - Edit ''/​var/​lib/​cobbler/​distro_signatures.json''​   - Edit ''/​var/​lib/​cobbler/​distro_signatures.json''​
   - ''​service cobblerd restart''​   - ''​service cobblerd restart''​
 +
 +===== Re-importing a Distro =====
 +This would typically be done if a newer ISO (minor revision) of an OS is released. ​ For example: if you wanted to import Ubuntu 16.04.3 in place of the original 16.04 image.
 +
 +  - First, you need to make sure no machines in Cobbler are set to use the distro you plan to replace
 +    - ssh to the Cobbler host
 +    - Set the profile for each machine using the distro you wish to replace with something else <​code>​
 +# Example:
 +for host in $(cobbler system find --profile Ubuntu-16.04-server-x86_64);​ do cobbler system edit --name=$host --profile inktank-rescue;​ done
 +</​code>​
 +      - You may wish to ''​cat''​ these hosts to a file so you can set the profile back after <​code>​
 +cobbler system find --profile Ubuntu-16.04-server-x86_64 > currently_xenial.dgalloway
 +for host in $(cat currently_xenial.dgalloway);​ do cobbler system edit --name=$host --profile inktank-rescue;​ done
 +# Reimport distro
 +for host in $(cat currently_xenial.dgalloway);​ do cobbler system edit --name=$host --profile Ubuntu-16.04-server-x86_64;​ done
 +rm currently_xenial.dgalloway
 +</​code>​
 +  - Delete all associated profiles under the **Profiles** tab in the Cobbler web UI
 +  - Delete the distro from **Distros** in the web UI
 +  - Proceed with [[services:​cobbler#​adding_a_new_distro|Re-adding the distro]]
services/cobbler.txt · Last modified: 2022/11/22 11:49 by akraitman