Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 03-prepare-user-data.md #1261

Merged
merged 4 commits into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,79 @@ For your initial testing, your user data may include global settings and site-sp

You may encounter the following scenarios when creating an Edge Installer configuration user data file. Use these examples as a starting point to help you create user data configurations that fit your needs.

## Sample User Data
```yaml
stylus:
site:
# The Palette API endpoint to use. The default value is api.spectrocloud.com.
paletteEndpoint: api.spectrocloud.com

# The edgeHostToken is an auto-registration token to register the Edge host with Palette upon bootup.
# This token can be generated by navigating to the Tenant Settings -> Registration Token.
# Specify a name and select the project id with which the Edge host should register itself.
edgeHostToken: aUAxxxxxxxxx0ChYCrO

# The Palette project ID the Edge host should pair with. This is an optional field if an edgeHostToken is used and the token was assigned to a project.
projectUid: 12345677788
# Tags which that will be assigned to the device as labels.
tags:
key1: value1
key2: value2
key3: value3

# The device's name, may also be referred to as the Edge ID or Edge host ID. If no Edge hostname is specified,
# a hostname will be generated from the device serial number. If the Edge Installer cannot identify the device serial number, then a random ID will
# be generated and used instead. In the case of hardware that does not have a serial number, we recommended specifying a
# random name, with minimal chances of being re-used by a different Edge host.
name: edge-appliance-1

# Optional
# If the Edge host requires a proxy to connect to Palette or to pull images, then specify the proxy information in this section
network:
# configures http_proxy
httpProxy: http://proxy.example.com
# configures https_proxy
httpsProxy: https://proxy.example.com
# configures no_proxy
noProxy: 10.10.128.10,10.0.0.0/8

# Optional: configures the global nameserver for the system.
nameserver: 1.1.1.1
# configure interface specific info. If omitted all interfaces will default to dhcp
interfaces:
enp0s3:
# type of network dhcp or static
type: static
# Ip address including the mask bits
ipAddress: 10.0.10.25/24
# Gateway for the static ip.
gateway: 10.0.10.1
# interface specific nameserver
nameserver: 10.10.128.8
enp0s4:
type: dhcp
caCerts:
- |
------BEGIN CERTIFICATE------
*****************************
*****************************
------END CERTIFICATE------
- |
------BEGIN CERTIFICATE------
*****************************
*****************************
------END CERTIFICATE------

# There is no password specified to the default kairos user. You must specify authorized keys or passwords to access the Edge host console.
stages:
initramfs:
- users:
kairos:
groups:
- sudo
passwd: kairos
```

## Connected Sites - Multiple User Data Configuration

In this example, two configuration user user data files are used. The first one is used in the staging phase and is included with the Edge Installer image. Note how the first user data contains the registration information and creates a user group. A bootable USB stick applies the second user data at the physical site. The secondary user data includes network configurations specific to the edge location.
Expand All @@ -84,44 +157,19 @@ stylus:
poweroff: true
```

**Site** - supplied at the edge location through a bootable USB drive.
**Site** - supplied at the edge location through a bootable USB drive. If specified, the `projectName` value overrides project information specified in the `edgeHostToken` parameter. You can add optional tags to identify the city, building, and zip-code. If the edge site requires a proxy for an outbound connection, provide it in the network section of the site user data.

```yaml
stylus:
site:
projectName: edge-sites
tags:
zip-code: 95135
stages:
network:
httpProxy: http://proxy.example.com
httpsProxy: https://proxy.example.com
noProxy: 10.10.128.10,10.0.0.0/8
nameserver: 1.1.1.1
interfaces:
enp0s3:
type: static
ipAddress: 10.0.10.25/24
gateway: 10.0.10.1
nameserver: 10.10.128.8
enp0s4:
type: dhcp
caCerts:
- |
------BEGIN CERTIFICATE------
*****************************
*****************************
------END CERTIFICATE------
- |
------BEGIN CERTIFICATE------
*****************************
*****************************
------END CERTIFICATE-----
projectName: edge-sites
tags:
zip-code: 95135
```

## Connected Sites - Single User Data

This example configuration is for a *connected site*. Therefore there is no need to specify a network proxy or network certificates.
This example configuration is for a *connected site*.
In this scenario, only a single Edge Installer configuration user data is used for the entire deployment process.

<br />
Expand Down Expand Up @@ -236,4 +284,4 @@ install:

# Next Steps

The last step of the EdgeForce workflow is to build the Edge artifact. Check out the [Build Images](/clusters/edge/edgeforge-workflow/build-images) guide to learn how to build your images with the Edge Installer Builder CLI and create an Edge artifact.
The last step of the EdgeForce workflow is to build the Edge artifact. Check out the [Build Images](/clusters/edge/edgeforge-workflow/build-images) guide to learn how to build your images with the Edge Installer Builder CLI and create an Edge artifact.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a change here.