Skip to content

Commit d9f87da

Browse files
committed
docs(ins): update docs rhel
1 parent bf15dc7 commit d9f87da

File tree

1 file changed

+75
-40
lines changed

1 file changed

+75
-40
lines changed

pages/instances/reference-content/use-red-hat-license.mdx

Lines changed: 75 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ This guide explains how to deploy a RHEL Instance and attach your existing Red H
2323

2424
## Deploying a RHEL Instance
2525

26-
2726
1. Click **CPU & GPU Instances** in the **Compute** section of the side menu. The [Instance dashboard](https://console.scaleway.com/instance/servers) displays.
2827
2. Click **Create Instance**. The [Instance creation page](https://console.scaleway.com/instance/servers) displays.
2928
3. Configure the Instance:
@@ -55,47 +54,83 @@ Once created, connect to your Instance over SSH:
5554
```
5655
Replace `<your_instance_ip>` with the actual public IP address of your Instance.
5756

58-
59-
6057
## Registering your Instance with Red Hat
6158

62-
After logging in, you must register the Instance to enable repositories and updates.
63-
64-
### Option A — Register with username/password
65-
66-
Run the following command to register your Instance using your Red Hat username and password:
67-
```bash
68-
sudo subscription-manager register
69-
```
70-
Enter your Red Hat Customer Portal credentials when prompted.
71-
72-
### Option B — Register with activation key
73-
74-
If you have an activation key to register your Instance, run the following command
75-
```bash
76-
sudo subscription-manager register \
77-
--org=<RED_HAT_ORGANIZATION_ID> \
78-
--activationkey=<RED_HAT_KEY>
79-
```
80-
Replace `RED_HAT_ORGANIZATION_ID` with your Red Hat organization ID and `RED_HAT_KEY` with your secret key issued by Red Hat.
81-
82-
## Attach a subscription
83-
84-
If your subscription is not automatically assigned, attach one manually:
85-
```bash
86-
sudo subscription-manager attach --auto
87-
```
88-
89-
Alternatively, you can list available subscriptions:
90-
```bash
91-
sudo subscription-manager list --available
92-
```
93-
94-
Chose a license and attach one:
95-
```bash
96-
sudo subscription-manager attach --pool=<RED_HAT_POOL_ID>
97-
```
98-
Replace `RED_HAT_POOL_ID` with the ID of the license pool you want to activate.
59+
<Tabs>
60+
<TabsTab label="Using SSH">
61+
After logging in, you must register the Instance to enable repositories and updates. The steps below describe how to regiser your Instance manually from the terminal. Alternatively you can register it automatically during deployment using [cloud-init](?tab=using-cloud-init-0).
62+
63+
### Option A — Register with username/password
64+
65+
Run the following command to register your Instance using your Red Hat username and password:
66+
```bash
67+
sudo subscription-manager register
68+
```
69+
Enter your Red Hat Customer Portal credentials when prompted.
70+
71+
### Option B — Register with activation key
72+
73+
If you have an activation key to register your Instance, run the following command
74+
```bash
75+
sudo subscription-manager register \
76+
--org=<RED_HAT_ORGANIZATION_ID> \
77+
--activationkey=<RED_HAT_KEY>
78+
```
79+
Replace `RED_HAT_ORGANIZATION_ID` with your Red Hat organization ID and `RED_HAT_KEY` with your secret key issued by Red Hat.
80+
81+
## Attach a subscription
82+
83+
If your subscription is not automatically assigned, attach one manually:
84+
```bash
85+
sudo subscription-manager attach --auto
86+
```
87+
88+
Alternatively, you can list available subscriptions:
89+
```bash
90+
sudo subscription-manager list --available
91+
```
92+
93+
Chose a license and attach one:
94+
```bash
95+
sudo subscription-manager attach --pool=<RED_HAT_POOL_ID>
96+
```
97+
Replace `RED_HAT_POOL_ID` with the ID of the license pool you want to activate.
98+
</TabsTab>
99+
<TabsTab label="Using cloud-init">
100+
Cloud-init may be used to automatically register your Instance during creation. To use this feature, simply add the following cloud-init configuration script to the `Cloud-Init` section of the `Settings` tab in the console:
101+
102+
### Option A — Register with username/password
103+
104+
Using your Red Hat username and password, use the following cloud-init configuration script:
105+
106+
```bash
107+
#cloud-config
108+
rh_subscription:
109+
110+
password: "youRedHatPassword"
111+
```
112+
113+
### Option B — Register with activation key
114+
115+
If you have an activation key to register your Instance, use the following cloud-init configuration script:
116+
117+
```bash
118+
#cloud-config
119+
rh_subscription:
120+
activation-key: RED_HAT_KEY
121+
org: "RED_HAT_ORGANIZATION_ID"
122+
```
123+
Replace `RED_HAT_ORGANIZATION_ID` with your Red Hat organization ID and `RED_HAT_KEY` with your secret key issued by Red Hat.
124+
125+
<Message type="important">
126+
Make sure to respect hyphen and quote usage in the cloud-init config scripts otherwise the subscription may silently fail.
127+
If the `cloud-init` subscription fails, the following line should appear in the `/var/log/cloud-init.log` file :
128+
```
129+
rh_subscription: module not configured.
130+
```
131+
</Message>
132+
</TabsTab>
133+
</Tabs>
99134

100135
## Confirm registration
101136

0 commit comments

Comments
 (0)