🐦 Major update

master
cheshire 2023-11-03 00:23:32 +01:00
parent c094de77d9
commit 129a90c65e
7 changed files with 23 additions and 32 deletions

View File

@ -2,8 +2,6 @@
In this chapter, I will describe how to build an environment in which we will build hscloud services.
The description is based on information obtained from conversations with @inf and from [hscloud user documentation](https://code.hackerspace.pl/hswaw/hscloud/src/branch/master/cluster/doc/user.md).
## Requirements
You need `git` and `curl`. On Ubuntu you can install them with:
@ -12,14 +10,6 @@ You need `git` and `curl`. On Ubuntu you can install them with:
sudo apt install git curl
```
Working `nix`. You can install `nix` with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
## Steps
Clone the repository with the source code of the cloud services:
```bash
@ -35,7 +25,15 @@ curl -Lo .git/hooks/commit-msg https://gerrit.hackerspace.pl/tools/hooks/commit-
chmod +x .git/hooks/commit-msg
```
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:
## Steps
We can configure the environment using niix-shell. To do this, we install `nix`:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
```
And we start it (from inside the `hscloud` folder):
```bash
nix-shell
@ -83,4 +81,4 @@ kubectl -n personal-$hs_username delete pod foo
## Next step
Next step: [Create http service](03-create-service.md)
Next step: [Create http service](02-create-service.md)

View File

@ -39,4 +39,4 @@ docker run hscloud:latest -it
## Next step
Next step: [Create http service](03-create-service.md)
Next step: [Create http service](02-create-service.md)

View File

@ -68,10 +68,12 @@ The import is done from the `kube.libsonnet` file in the `kube` folder in the `h
The `hscloud` configuration only allows the namespace in `personal-$hs_username` format. In addition, we need to change the domain to `*.$hs_username.hscloud.ovh`. Finally, we change the service name to `test`.
Finally, the above fragment of the `prod.jsonnet` file should look like this (remember to replace `$hs_username` with your username!):
Finally, the above fragment of the `prod.jsonnet` file should look like this:
```jsonnet
# remember to replace $hs_username with your username!
local kube = import "../../../kube/kube.libsonnet";
{

View File

@ -4,7 +4,7 @@ In this chapter, we will build our own web service using the Flask framework, do
## Requirements
Working nix. You can install nix with command:
Working `nix`. You can install nix with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon

View File

@ -1,10 +1,10 @@
# Deploying docker image on hscloud
In this chapter, we will deploy our registered docker image on hscloud as a simple HTTP kube service with HTTPS from Let's Encrypt.
In this chapter, we will deploy our registered docker image on `hscloud` as a simple HTTP kube service with HTTPS from Let's Encrypt.
## Requirements
Working nix. You can install nix with command:
Working `nix`. You can install `nix` with command:
```bash
sh <(curl -L https://nixos.org/nix/install) --daemon
@ -20,7 +20,7 @@ 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)).
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](03-build-web-app.md) chapter. We also need a running `prodaccess` authorization (details: [Building environment](01-1-build-on-ubuntu.md)).
## Steps

View File

@ -1,9 +0,0 @@
MIT License
Copyright (c) 2023 cheshire
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -4,14 +4,14 @@ Introduction to creating services in hscloud. This set of documents is intended
## Preparing tools
- [Building environment on Ubuntu](01-build-on-ubuntu.md)
- [Building environment on Docker](02-build-on-docker.md)
- [Building environment on Ubuntu](01-1-build-on-ubuntu.md)
- [Building environment on Docker](01-2-build-on-docker.md)
## Deploying a sample service
- [Deploying the ldapweb service](03-create-service.md)
- [Deploying the ldapweb service](02-create-service.md)
## Building own service
- [Building a simple Flask web application](04-build-web-app.md)
- [Deploying docker image on hscloud](05-deploy-web-app.md)
- [Building a simple Flask web application](03-build-web-app.md)
- [Deploying docker image on hscloud](04-deploy-web-app.md)