Top-level seed data doc and re-numbering (#2109)

* created separate doc for seeding data

* re-numbered doc names
This commit is contained in:
Martavis Parker 2021-09-20 11:48:24 -07:00 committed by GitHub
parent 5eb14e290f
commit 4f3f6187d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 64 additions and 65 deletions

View File

@ -1,19 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: fleet-loadbalancer
labels:
app: fleet-loadbalancer
spec:
type: LoadBalancer
ports:
- name: proxy-tls
port: 443
targetPort: 443
protocol: TCP
- name: proxy-http
port: 80
targetPort: 80
protocol: TCP
selector:
app: fleet-webserver
apiVersion: v1
kind: Service
metadata:
name: fleet-loadbalancer
labels:
app: fleet-loadbalancer
spec:
type: LoadBalancer
ports:
- name: proxy-tls
port: 443
targetPort: 443
protocol: TCP
- name: proxy-http
port: 80
targetPort: 80
protocol: TCP
selector:
app: fleet-webserver

View File

@ -7,7 +7,7 @@
- [Test hosts](#test-hosts)
- [Email](#email)
- [Database backup/restore](#database-backuprestore)
- [Teams seed data](#teams-seed-data)
- [Seeding Data](./6-Seeding-Data.md)
- [MySQL shell](#mysql-shell)
- [Testing SSO](#testing-sso)
@ -231,51 +231,6 @@ Restore:
Note that a "restore" will replace the state of the development database with the state from the backup.
## Teams seed data
When developing Fleet, it may be useful to create seed data that includes users and teams.
Check out this Loom demo video that walks through creating teams seed data:
https://www.loom.com/share/1c41a1540e8f41328a7a6cfc56ad0a01
For a text-based walkthrough, check out the following steps:
First, create a `env` file with the following contents:
```
export SERVER_URL=https://localhost:8080 # your fleet server url and port
export CURL_FLAGS='-k -s' # set insecure flag
export TOKEN=eyJhbGciOi... # your login token
```
Next, set the `FLEET_ENV_PATH` to point to the `env` file. This will let the scripts in the `fleet/` folder source the env file.
```
export FLEET_ENV_PATH=/Users/victor/fleet_env
```
Finally run one of the bash scripts located in the [/tools/api](../../tools/api/README.md) directory.
The `fleet/create_free` script will generate an environment to roughly reflect an installation of Fleet Free. The script creates 3 users with different roles.
```
./tools/api/fleet/teams/create_free
```
The `fleet/create_premium` script will generate an environment to roughly reflect an installation of Fleet Premium. The script will create 2 teams 4 users with different roles.
```
./tools/api/fleet/teams/create_premium
```
The `fleet/create_figma` script will generate an environment to reflect the mockups in the Fleet EE (current) Figma file. The script creates 3 teams and 12 users with different roles.
```
./tools/api/fleet/teams/create_figma
```
Each user generated by the script has their password set to `user123#`.
## MySQL shell
Connect to the MySQL shell to view and interact directly with the contents of the development database.

View File

@ -0,0 +1,44 @@
# Seeding Data
When developing Fleet, it may be useful to create seed data that includes users and teams.
Check out this Loom demo video that walks through creating teams seed data:
https://www.loom.com/share/1c41a1540e8f41328a7a6cfc56ad0a01
For a text-based walkthrough, check out the following steps:
First, create a `env` file with the following contents:
```
export SERVER_URL=https://localhost:8080 # your fleet server url and port
export CURL_FLAGS='-k -s' # set insecure flag
export TOKEN=eyJhbGciOi... # your login token
```
Next, set the `FLEET_ENV_PATH` to point to the `env` file. This will let the scripts in the `fleet/` folder source the env file.
```
export FLEET_ENV_PATH=/Users/victor/fleet_env
```
Finally run one of the bash scripts located in the [/tools/api](../../tools/api/README.md) directory.
The `fleet/create_free` script will generate an environment to roughly reflect an installation of Fleet Free. The script creates 3 users with different roles.
```
./tools/api/fleet/teams/create_free
```
The `fleet/create_premium` script will generate an environment to roughly reflect an installation of Fleet Premium. The script will create 2 teams 4 users with different roles.
```
./tools/api/fleet/teams/create_premium
```
The `fleet/create_figma` script will generate an environment to reflect the mockups in the Fleet EE (current) Figma file. The script creates 3 teams and 12 users with different roles.
```
./tools/api/fleet/teams/create_figma
```
Each user generated by the script has their password set to `user123#`.