-
Notifications
You must be signed in to change notification settings - Fork 2
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some notes on getting started on developing for buildomat #53
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Getting started for developing buildomat | ||
|
||
Buildomat needs to run on an illumos system | ||
|
||
|
||
- `mkdir buildomat_stuff` | ||
|
||
- `cd buildomat_stuff` | ||
|
||
- `mkdir data` | ||
|
||
- `touch data/data.sqlite3` | ||
|
||
- create a sample `server.toml` file | ||
|
||
``` | ||
[admin] | ||
token = "<ADMIN TOKEN>" | ||
hold = false | ||
|
||
[general] | ||
baseurl = "NOTUSED" | ||
|
||
[storage] | ||
access_key_id = "YOUR VALUE" | ||
secret_access_key = "YOUR VALUE" | ||
bucket = "YOUR VALUE" | ||
prefix = "YOUR VALUE" | ||
region = "YOUR VALUE" | ||
|
||
[job] | ||
max_runtime = <something reasonable> | ||
|
||
[sqlite] | ||
```` | ||
|
||
- run `buildomat-server -f server.toml`. This should start a server process. | ||
|
||
- Create a `user.toml` file (this can also live in `~/.config/buildomat/config.toml` | ||
``` | ||
[profile.default] | ||
url = "http://127.0.0.1:9979" | ||
secret = "<ADD TOKEN>" | ||
admin = "<ADD TOKEN>" | ||
``` | ||
- run `buildomat -p user.toml admin user create admin`. This will spit out an `ADMIN_TOKEN` | ||
- Edit `user.toml` to add the token to both `secret` and `admin` (you can create another user later if you so desire!) | ||
|
||
- Edit `server.toml` to add the token to the `admin` line | ||
|
||
- Create a factory `buildomat admin factory create factory_name` this will | ||
spit out a `FACTORY_TOKEN` which needs to go in a factory TOML file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aha, i was wondering what you were doing that you got here but didn't mention factory TOMLs themselves, then i found #52 :) |
||
|
||
- Create a target `buildomat admin target create -d "something here" targetname` | ||
this will spit out a `TARGET_TOKEN` which will go in the factory TOML file | ||
|
||
This should be enough to run the factory of your choosing and run | ||
`buildomat job run -c your_script.sh -t yourtarget -n jobname` | ||
|
||
nginx is available on illumos and easy to setup as a reverse proxy to | ||
redirect requests to your `buildomat-server` | ||
Comment on lines
+60
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm running the server with |
||
|
||
``` | ||
location / { | ||
proxy_pass http://127.0.0.1:9979; | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw i don't think the token created here is particularly special for admin purposes, it's just a user token. by setting the server's
admin.token
and client'sprofile.default.admin
to this token, we'll also happen to set that same user token as the administrative key (... and if you were to accidentally delete the admin user then whoops the key's dead)so, i see how this works, but it's probably better to pick a decent secret administrative token (e.g.
dd if=/dev/urandom bs=64 count=1 | base64 -
) that is distinct from any user token?(i also think it might be good to create an
admin
user with all privileges when setting up the database, whose token isadmin.token
, then collapsing the distinction between "secret admin token" and "user token". but that's a Josh conversation i'll bring up elsewhere :D)