Remove --key-name from OpenStack examples, clarify SSH key is in cloud-init
This commit is contained in:
+3
-3
@@ -27,7 +27,9 @@ Customize `cloud-init.yml` — replace the SSH public key and optionally the hos
|
|||||||
|
|
||||||
#### Full OpenStack example
|
#### Full OpenStack example
|
||||||
|
|
||||||
Cloud-init only handles guest configuration — flavor, image, network, and security group must be specified explicitly at creation time:
|
Cloud-init only handles guest configuration — flavor, image, network, and security group must be specified explicitly at creation time.
|
||||||
|
|
||||||
|
> **Note:** Do not use `--key-name` — the SSH key is configured in `cloud-init.yml` under `ssh_authorized_keys` for the `devbox` user. The `--key-name` flag injects into the image's default user (e.g. `debian`), not the `devbox` user created by cloud-init.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# List available flavors to choose appropriate sizing
|
# List available flavors to choose appropriate sizing
|
||||||
@@ -42,7 +44,6 @@ openstack server create \
|
|||||||
--image debian-13-trixie \
|
--image debian-13-trixie \
|
||||||
--network my-network \
|
--network my-network \
|
||||||
--security-group opencode-devbox \
|
--security-group opencode-devbox \
|
||||||
--key-name my-ssh-key \
|
|
||||||
--user-data cloud-init.yml \
|
--user-data cloud-init.yml \
|
||||||
devbox-vm
|
devbox-vm
|
||||||
```
|
```
|
||||||
@@ -55,7 +56,6 @@ openstack server create \
|
|||||||
--flavor c4m8 \
|
--flavor c4m8 \
|
||||||
--network my-network \
|
--network my-network \
|
||||||
--security-group opencode-devbox \
|
--security-group opencode-devbox \
|
||||||
--key-name my-ssh-key \
|
|
||||||
--user-data cloud-init.yml \
|
--user-data cloud-init.yml \
|
||||||
--block-device source=image,id=$(openstack image show debian-13-trixie -f value -c id),dest=volume,size=40,shutdown=preserve,bootindex=0,volume_type=performance \
|
--block-device source=image,id=$(openstack image show debian-13-trixie -f value -c id),dest=volume,size=40,shutdown=preserve,bootindex=0,volume_type=performance \
|
||||||
devbox-vm
|
devbox-vm
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ users:
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
# CUSTOMIZE: replace with your public SSH key
|
# CUSTOMIZE: replace with your public SSH key.
|
||||||
|
# This is the only SSH key config needed — do NOT use --key-name with
|
||||||
|
# openstack server create, as that injects into the image's default
|
||||||
|
# user (e.g. debian), not the devbox user defined here.
|
||||||
- ssh-ed25519 AAAA... your-key-here
|
- ssh-ed25519 AAAA... your-key-here
|
||||||
|
|
||||||
# ── Optional: console password ───────────────────────────────────────
|
# ── Optional: console password ───────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user