Skip to content

Commit c229e8b

Browse files
Okeanosdustymabe
authored andcommitted
provisioning-*: add information on how to connect via SSH
As discussed in coreos#186 the provisioning pages now contain information on how to connect to the newly spawned VMs. Additionally, formatting is further standardized between some pages and the Ignition/Afterburn information is also added to the authentication/default user page. The AWS example was split into two to make editing them easier going forward. Fixes some references to outdated external tools (`gcloud compute ssh`, `govc`) as well. Fixes coreos#186
1 parent 53be420 commit c229e8b

19 files changed

Lines changed: 185 additions & 45 deletions

modules/ROOT/pages/authentication.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
By default, a privileged user named `core` is created on the Fedora CoreOS system, but it is not configured with a default password or SSH key. If you wish to use the `core` user, you must provide an Ignition config which includes a password and/or SSH key(s) for the `core` user. Alternatively you may create additional, new users via Ignition configs.
66

7+
If you do not want to use Ignition to manage the default user's SSH key(s), you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via your cloud provider.
8+
79
== Creating a New User
810

911
To create a new user (or users), add it to the `users` list of your Butane config. In the following example, the config creates two new usernames, but doesn't configure them to be especially useful.

modules/ROOT/pages/getting-started-aws.adoc

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,8 @@ TIP: You can find out the instance's assigned IP by running `aws ec2 describe-in
3333

3434
You now should be able to SSH into the instance using the associated IP address.
3535

36-
In order to launch a customized FCOS instance, a valid Ignition configuration must be passed as its https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-add-user-data[user data] at creation time. You can use the same command from above but add `--user-data file://path/to/config.ign` argument:
37-
38-
.Launching and customizing a new instance
36+
.Example connecting
3937
[source, bash]
4038
----
41-
NAME='instance1'
42-
SSHKEY='my-key' # the name of your SSH key: `aws ec2 describe-key-pairs`
43-
IMAGE='ami-xxx' # the AMI ID found on the download page
44-
DISK='20' # the size of the hard disk
45-
REGION='us-east-1' # the target region
46-
TYPE='m5.large' # the instance type
47-
SUBNET='subnet-xxx' # the subnet: `aws ec2 describe-subnets`
48-
SECURITY_GROUPS='sg-xx' # the security group `aws ec2 describe-security-groups`
49-
USERDATA='/path/to/config.ign' # path to your Ignition config
50-
aws ec2 run-instances \
51-
--region $REGION \
52-
--image-id $IMAGE \
53-
--instance-type $TYPE \
54-
--key-name $SSHKEY \
55-
--subnet-id $SUBNET \
56-
--security-group-ids $SECURITY_GROUPS \
57-
--user-data "file://${USERDATA}" \
58-
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=${NAME}}]" \
59-
--block-device-mappings "VirtualName=/dev/xvda,DeviceName=/dev/xvda,Ebs={VolumeSize=${DISK}}"
39+
ssh core@<ip address>
6040
----
61-
62-
NOTE: By design, cloud-init configuration and startup scripts are not supported on FCOS. Instead, it is recommended to encode any startup logic as systemd service units in the Ignition configuration.

modules/ROOT/pages/getting-started-libvirt.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ NOTE: Depending on your version of `virt-install`, you may not be able to use `-
4242
TIP: Make sure that your user has access to `/dev/kvm`. The default is to allow access for everyone, but on some distributions you may need to add yourself to the `kvm` group.
4343

4444
TIP: You can escape out of the serial console by pressing `CTRL + ]`.
45+
46+
If you set up an xref:authentication.adoc[SSH key] for the default `core` user, you can SSH into the VM and explore the OS:
47+
48+
[source, bash]
49+
----
50+
ssh core@<ip address>
51+
----

modules/ROOT/pages/getting-started.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ For more information on configuration, refer to the documentation for xref:produ
2727

2828
include::getting-started-aws.adoc[]
2929

30+
A more complete example that allows customization is described in xref:provisioning-aws.adoc[].
31+
3032
=== Booting on a local hypervisor (libvirt example)
3133

3234
include::getting-started-libvirt.adoc[]

modules/ROOT/pages/provisioning-aliyun.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This guide shows how to provision new Fedora CoreOS (FCOS) nodes on Alibaba Clou
66

77
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support].
1012

1113
You also need to have access to an Alibaba Cloud account and https://www.alibabacloud.com/help/doc-detail/31884.htm?spm=a2c63.p38356.879954.10.3d1264baRYHfmB#task-njz-hf4-tdb[activated Object Storage Service (OSS)].
1214
The examples below use the https://www.alibabacloud.com/help/product/29991.htm[Alibaba Cloud CLI] and https://stedolan.github.io/jq/[jq] as a command-line JSON processor.

modules/ROOT/pages/provisioning-aws.adoc

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,56 @@ This guide shows how to provision new Fedora CoreOS (FCOS) instances on the Amaz
66

77
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support].
1012

1113
You also need to have access to an AWS account. The examples below use the https://aws.amazon.com/cli/[aws] command-line tool, which must be separately installed and configured beforehand.
1214

1315
== Launching a VM instance
1416

17+
=== Minimal Example
18+
1519
include::getting-started-aws.adoc[]
20+
21+
=== Customized Example
22+
23+
In order to launch a customized FCOS instance, a valid Ignition configuration must be passed as its https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-add-user-data[user data] at creation time. You can use the same command from the xref:#_minimal_example[] but add `--user-data file://path/to/config.ign` argument:
24+
25+
NOTE: The SSH key for the `core` user is supplied via Afterburn in this example as well.
26+
27+
.Launching and customizing a new instance
28+
[source,bash]
29+
----
30+
NAME='instance1'
31+
SSHKEY='my-key' # the name of your SSH key: `aws ec2 describe-key-pairs`
32+
IMAGE='ami-xxx' # the AMI ID found on the download page
33+
DISK='20' # the size of the hard disk
34+
REGION='us-east-1' # the target region
35+
TYPE='m5.large' # the instance type
36+
SUBNET='subnet-xxx' # the subnet: `aws ec2 describe-subnets`
37+
SECURITY_GROUPS='sg-xx' # the security group `aws ec2 describe-security-groups`
38+
USERDATA='/path/to/config.ign' # path to your Ignition config
39+
aws ec2 run-instances \
40+
--region $REGION \
41+
--image-id $IMAGE \
42+
--instance-type $TYPE \
43+
--key-name $SSHKEY \
44+
--subnet-id $SUBNET \
45+
--security-group-ids $SECURITY_GROUPS \
46+
--user-data "file://${USERDATA}" \
47+
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=${NAME}}]" \
48+
--block-device-mappings "VirtualName=/dev/xvda,DeviceName=/dev/xvda,Ebs={VolumeSize=${DISK}}"
49+
----
50+
51+
NOTE: By design, cloud-init configuration and startup scripts are not supported on FCOS. Instead, it is recommended to encode any startup logic as systemd service units in the Ignition configuration.
52+
53+
TIP: You can find out the instance's assigned IP by running `aws ec2 describe-instances`
54+
55+
You now should be able to SSH into the instance using the associated IP address.
56+
57+
.Example connecting
58+
[source, bash]
59+
----
60+
ssh core@<ip address>
61+
----

modules/ROOT/pages/provisioning-azure.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This guide shows how to provision new Fedora CoreOS (FCOS) nodes on Azure. Fedor
66

77
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support].
1012

1113
You also need to have access to an Azure subscription. The examples below use the https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest[Azure CLI].
1214

@@ -71,3 +73,11 @@ az_vm_name="my-fcos-vm"
7173
ignition_path="./config.ign"
7274
az vm create -n "${az_vm_name}" -g "${az_resource_group}" --image "${az_image_name}" --admin-username core --custom-data "$(cat ${ignition_path})"
7375
----
76+
77+
. You now should be able to SSH into the instance using the associated IP address.
78+
+
79+
.Example connecting
80+
[source, bash]
81+
----
82+
ssh core@<ip address>
83+
----

modules/ROOT/pages/provisioning-digitalocean.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This guide shows how to provision new Fedora CoreOS (FCOS) nodes on DigitalOcean
66

77
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support].
1012

1113
You also need to have access to a DigitalOcean account. The examples below use the https://github.com/digitalocean/doctl[doctl] command-line tool.
1214

@@ -48,4 +50,12 @@ key_id=$(doctl compute ssh-key list | grep my-key | cut -f1 -d ' ')
4850
doctl compute droplet create my-fcos-droplet --image "${image_id}" --region sfo2 --size s-2vcpu-2gb --user-data-file <ignition-config-path> --ssh-keys "${key_id}" --wait
4951
----
5052
+
51-
While the DigitalOcean documentation mentions cloud-init and scripts, FCOS does not support cloud-init or the ability to run scripts from user-data. It accepts only Ignition configuration files.
53+
NOTE: While the DigitalOcean documentation mentions `cloud-init` and scripts, FCOS does not support cloud-init or the ability to run scripts from user-data. It accepts only Ignition configuration files.
54+
55+
. You now should be able to SSH into the instance using the associated IP address.
56+
+
57+
.Example connecting
58+
[source, bash]
59+
----
60+
ssh core@<ip address>
61+
----

modules/ROOT/pages/provisioning-exoscale.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This guide shows how to provision new Fedora CoreOS (FCOS) instances on https://
66

77
Before provisioning an FCOS machine, it is recommended to have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support]..
1012

1113
You also need to have access to an Exoscale account. https://portal.exoscale.com/register[Register] if you don't have one.
1214

@@ -74,4 +76,12 @@ exo compute instance create $NAME \
7476

7577
NOTE: If just SSH access is desired and no further customization is required, you don't need to pass any Ignition file and you can omit the `--cloud-init` argument.
7678

77-
Now you can find the IP address of the instance via `exo compute instance show $NAME` and SSH into the instance. If you didn’t change the defaults, the username is `core` and `ssh core@$IP` should work.
79+
TIP: You can find out the instance's assigned IP by running `exo compute instance show $NAME`
80+
81+
You now should be able to SSH into the instance using the associated IP address.
82+
83+
.Example connecting
84+
[source, bash]
85+
----
86+
ssh core@<ip address>
87+
----

modules/ROOT/pages/provisioning-gcp.adoc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This guide shows how to provision new Fedora CoreOS (FCOS) instances on Google C
66

77
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
88

9-
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support] and provide an SSH key via the cloud provider and continue from there.
9+
NOTE: Fedora CoreOS has a default `core` user that can be used to explore the OS. If you want to use it, finalize its xref:authentication.adoc[configuration] by providing e.g. an SSH key.
10+
11+
If you do not want to use Ignition to get started, you can make use of the https://coreos.github.io/afterburn/platforms/[Afterburn support].
1012

1113
You also need to have access to a GCP account. The examples below use the https://cloud.google.com/sdk/gcloud[gcloud] command-line tool, which must be separately installed and configured beforehand.
1214

@@ -37,7 +39,7 @@ New GCP instances can be directly created and booted from public FCOS images.
3739

3840
If you just want SSH access and no further customization, you don't need to pass any custom instance metadata. Depending on your GCP project configuration, relevant SSH public keys will be automatically added to the VM. This provides an easy way to test out FCOS without first creating an Ignition config.
3941

40-
NOTE: Currently we don't support logging in using ssh through the GCP web console, using the `gcloud beta compute ssh` cli method or OS Login. See https://github.com/coreos/fedora-coreos-tracker/issues/648[fedora-coreos-tracker#648] for more information.
42+
NOTE: Currently we don't support logging in using SSH through the GCP web console, using the `gcloud compute ssh` CLI method or OS Login. See https://github.com/coreos/fedora-coreos-tracker/issues/648[fedora-coreos-tracker#648] for more information.
4143

4244
.Launching a new instance
4345
[source, bash]
@@ -47,7 +49,15 @@ VM_NAME='fcos-node01'
4749
gcloud compute instances create --image-project "fedora-coreos-cloud" --image-family "fedora-coreos-${STREAM}" "${VM_NAME}"
4850
----
4951

50-
Once the VM finished booting, you should be able to SSH into the instance using the IP address associated with the instance. If you didn’t change the defaults, the username is `core` and `ssh core@IP` should work.
52+
TIP: You can find out the instance's assigned IP by running `gcloud compute instances list`
53+
54+
You now should be able to SSH into the instance using the associated IP address.
55+
56+
.Example connecting
57+
[source, bash]
58+
----
59+
ssh core@<ip address>
60+
----
5161

5262
In order to launch a customized FCOS instance, a valid Ignition configuration must be passed as user-data at creation time:
5363

0 commit comments

Comments
 (0)