diff --git a/.github/workflows/tags.yaml b/.github/workflows/tags.yaml index 3d89c5b2..41f9110c 100644 --- a/.github/workflows/tags.yaml +++ b/.github/workflows/tags.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-go@v2 with: go-version: "1.15.5" - - run: ./script/release-binaries.sh + - run: ./releases/script/release-binaries.sh name: get binaries - name: Create Release id: create_release @@ -30,4 +30,4 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["./out/release/*"]' + asset_paths: '["./releases/out/release/*"]' diff --git a/.github/workflows/vagrant-packet.yaml b/.github/workflows/vagrant-packet.yaml index d46c8abb..403878e2 100644 --- a/.github/workflows/vagrant-packet.yaml +++ b/.github/workflows/vagrant-packet.yaml @@ -19,4 +19,5 @@ jobs: - name: Vagrant Test run: | export VAGRANT_DEFAULT_PROVIDER="virtualbox" - go test --timeout 1h -v ./test/vagrant + cd ./test/vagrant + go test --timeout 1h -v ./ diff --git a/.gitignore b/.gitignore index 7f605a22..376b19b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ envrc out -.env +!deploy/.env +.vagrant +deploy/compose/state/webroot/misc/osie/current/* +deploy/compose/state/webroot/workflow/* +!deploy/compose/state/webroot/misc/osie/current/.keep +!deploy/compose/state/webroot/workflow/.keep +deploy/compose/state/webroot/*.gz +workflow_id.txt +compose.tar.gz diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..b60a0304 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,45 @@ +## Hello Contributors! + +Thanks for your interest! +We're so glad you're here. + +### Important Resources + +#### bugs: [https://github.com/tinkerbell/sandbox/issues](https://github.com/tinkerbell/sandbox/issues) + +### Code of Conduct + +Please read and understand the code of conduct found [here](https://github.com/tinkerbell/.github/blob/master/CODE_OF_CONDUCT.md). + +### DCO Sign Off + +Please read and understand the DCO found [here](docs/DCO.md). + +### Environment Details + +Building is handled by `make`, please see the [Makefile](Makefile) for available targets. + +#### Nix + +This repo's build environment can be reproduced using `nix`. + +##### Install Nix + +Follow the [Nix installation](https://nixos.org/download.html) guide to setup Nix on your box. + +##### Load Dependencies + +Loading build dependencies is as simple as running `nix-shell` or using [lorri](https://github.com/nix-community/lorri). +If you have `direnv` installed the included `.envrc` will make that step automatic. + +### How to Submit Change Requests + +Please submit change requests and / or features via [Issues](https://github.com/tinkerbell/sandbox/issues). +There's no guarantee it'll be changed, but you never know until you try. +We'll try to add comments as soon as possible, though. + +### How to Report a Bug + +Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/tinkerbell/sandbox/issues). + +## Code Style Guides diff --git a/README.md b/README.md index 682a0258..b5e45d8b 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,47 @@ -This repository is a quick way to get the Tinkerbell stack up and running. +# Quick-Starts -Currently it supports: +The following quick-start guides will walk you through standing up the Tinkerbell stack. +There are a few options for this. +Pick the one that works best for you. -1. Vagrant with libvirt and VirtualBox -2. Terraform on Packet +## Options -Tinkerbell is made of different components: osie, boots, tink-server, -tink-worker and so on. Currently they are under heavy development and we are -working around the release process for all the components. +- [Vagrant and VirtualBox](docs/quickstarts/VAGRANTVBOX.md) +- [Vagrant and Libvirt](docs/quickstarts/VAGRANTLVIRT.md) +- [Docker Compose](docs/quickstarts/COMPOSE.md) +- [Terraform and Equinix Metal](docs/quickstarts/TERRAFORMEM.md) +- [Kubernetes](docs/quickstarts/KUBERNETES.md) +- [Multipass](docs/quickstarts/MULTIPASS.md) -We need a way to serve a version of Tinkerbell that you can use and we know what -is running the hood. Sandbox runs a pinned version for all the components via -commit sha. In this way as a user you won't be effected (ideally) from new code -that will may change a bit how Tinkerbell works. +## Next Steps -We are keeping the number of breaking changes as low as possible but in the current -state they are expected. +Now that you have a Tinkerbell stack up and running, you can start provisioning machines. +Tinkerbell.org has a [list of guides](https://docs.tinkerbell.org/deploying-operating-systems/the-deployment/) for provisioning machines. +You can also create your own. +The following docs will help you get started. -## Binary release +1. [Create Hardware Data](https://docs.tinkerbell.org/setup/local-vagrant/#creating-the-workers-hardware-data) +2. [Create a Template](https://docs.tinkerbell.org/setup/local-vagrant/#creating-a-template) +3. [Create a Workflow](https://docs.tinkerbell.org/setup/local-vagrant/#creating-the-workflow) -As part of a new release for sandbox we want to push binaries to GitHub Release -in this way the community will be able to use them if needed. +### In the Sandbox -We build Docker images across many architectures, each of them in its own -repository: boots, hegel, tink and so on. +1. Create your own templates -Sandbox is just a collection of those services and we follow the same pattern -for getting binaries as well. + ```bash + docker exec -i compose_tink-cli_1 tink template create < ./custom-template.yaml + ``` -There is a go program available in `./cmd/getbinariesfromquay/main.go`. You can -run it with `go run` or build it with `go build`: +2. Upload any container images you want to use in the templates to the internal registry -```terminal -$ go run cmd/getbinariesfromquay/main.go -h - -binary-to-copy string - The location of the binary you want to copy from inside the image. (default "/usr/bin/hegel") - -image string - The image you want to download binaries from. It has to be a multi stage image. (default "docker://quay.io/tinkerbell/hegel") - -out string - The directory that will be used to store the release binaries (default "./out") - -program string - The name of the program you are extracing binaries for. (eg tink-worker, hegel, tink-server, tink, boots) (default "hegel") -``` + ```bash + docker run -it --rm quay.io/containers/skopeo copy --all --dest-tls-verify=false --dest-creds="admin":"Admin1234" docker://hello-world docker://192.168.50.4/hello-world + ``` -By default it uses the image running on Quay for Hegel and it gets the binary -`/usr/bin/hegel` from there. The directory `./out` is used to store images and -binaries inside `./out/releases`. +3. Create a workflow -To get the binaries for example for boots you can run: + ```bash + docker exec -i compose_tink-cli_1 tink workflow create -t