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 2 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,80 @@ 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:
# host for hubble api to register device.
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
paletteEndpoint: api.spectrocloud.com

# edgeHostToken is auto-registration token when edge host registers with the saas by itself when it boots up
# this token can be generated by browsing to Tenant Settings -> Registration Token.
# specify name and select project id in which edge host should register itself
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
edgeHostToken: aUAxxxxxxxxx0ChYCrO

# projectUid <Optional :need to provide if edge host registration token is not generated using project id>
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
projectUid: 12345677788
# tags which will be assigned to devices as labels
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
tags:
key1: value1
key2: value2
key3: value3

# name of the device, this may also be referred to as the edge id or edge host id. If no edge host name is specified
# one will be generated from the device serial number. If stylus cannot the device serial number a random id will
# be used instead. In the case of hardware that does not have a serial number is highly recommended to specify the
# device name as a random name is not deterministic and may lead to a device being registered twice under different
# names.
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
name: edge-appliance-1

# Optional
# If edge host requires proxy to connect to palette instance or to pull images then do specify proxy information here
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
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 default kairos user. To access edge host console, we will need to specify authorized keys or password.
karl-cardenas-coding marked this conversation as resolved.
Show resolved Hide resolved
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 +158,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 +285,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.