🐹 Update tutorials

This commit is contained in:
Ch3shireDev 2023-10-26 21:17:45 +02:00
parent aa7fae715e
commit 41784b5755
5 changed files with 57 additions and 17 deletions

View file

@ -15,18 +15,6 @@ sudo apt update
sudo apt install git curl
```
We download and install the `nix` package manager (source: [nixos.org](https://nixos.org/download)):
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
After this operation, log out and log back in to use `nix`.
```bash
reboot # overkill, but sure.
```
Clone the repository with the source code of the cloud services:
```bash
@ -42,4 +30,12 @@ curl -Lo .git/hooks/commit-msg https://gerrit.hackerspace.pl/tools/hooks/commit-
chmod +x .git/hooks/commit-msg
```
We download and install the `nix` package manager (source: [nixos.org](https://nixos.org/download)):
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
After this operation, log out and log back in to use `nix`.
Next step: [Build environment](02-build-environment.md)

View file

@ -12,24 +12,20 @@ Working nix. You can install nix with command:
sh <(curl -L https://nixos.org/nix/install) --daemon
```
## Steps
We create the environment in which we will build services. To do this, we create the environment based on the definitions in the `shell.nix` file:
```bash
nix-shell
```
We now use the `bazel` tool to build and run the necessary services, including `prodaccess` and `kubectl`:
```bash
bazel build //tools:install
bazel run //tools:install
```
## Steps
Now we can request to grant us access to the hscloud cluster through the [prodaccess](https://pkg.go.dev/code.hackerspace.pl/hscloud/cluster/prodaccess#section-readme) tool. In place of `$hs_username` insert the username in SSO hackerspace:

View file

@ -2,6 +2,23 @@
In this chapter, I will show you how to create a service that will be publicly available on the Internet.
## Requirements
Working nix. You can install nix with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
and start it with:
```bash
nix-shell
bazel build //tools:install
bazel run //tools:install
```
## Creating a copy of ldapweb
We start by enabling the nix-shell environment:

View file

@ -4,6 +4,21 @@ In this chapter, we will build our own web service using the Flask framework, do
## Requirements
Working nix. You can install nix with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
and start it with:
```bash
nix-shell
bazel build //tools:install
bazel run //tools:install
```
You will require `docker` in this example. Install it from your standard shell.
```bash

View file

@ -4,6 +4,22 @@ In this chapter, we will deploy our registered docker image on hscloud as a simp
## Requirements
Working nix. You can install nix with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
and start it with:
```bash
nix-shell
bazel build //tools:install
bazel run //tools:install
```
inside `hscloud` repo.
We need a registered docker image in the registry. If you don't have one, you can create it by following the [Building your own Flask web service](04-build-web-app.md) chapter. We also need a running `prodaccess` authorization (details: [Building environment](02-build-environment.md)).
## Steps