From 38f65801adb038fe24a97a07f220541f6e1dc6c0 Mon Sep 17 00:00:00 2001 From: Mik-TF Date: Tue, 14 May 2024 11:54:28 -0400 Subject: [PATCH] manual, parsing devs flist --- .../flist_debian_case_study.md | 50 +++++++++---------- .../developers/flist/flist_hub/zos_hub.md | 8 +-- collections/developers/proxy/proxy.md | 16 +++--- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/collections/developers/flist/flist_case_studies/flist_debian_case_study.md b/collections/developers/flist/flist_case_studies/flist_debian_case_study.md index 3777433..4a8c1a1 100644 --- a/collections/developers/flist/flist_case_studies/flist_debian_case_study.md +++ b/collections/developers/flist/flist_case_studies/flist_debian_case_study.md @@ -223,27 +223,27 @@ You now have access to the Docker Hub from your local computer. We will then pro * Make sure the Docker Daemon is running * Build the docker container * Template: - * ``` - docker build -t / . - ``` + ``` + docker build -t / . + ``` * Example: - * ``` - docker build -t username/debian12 . - ``` + ``` + docker build -t username/debian12 . + ``` * Push the docker container to the [Docker Hub](https://hub.docker.com/) * Template: - * ``` - docker push / - ``` + ``` + docker push / + ``` * Example: - * ``` - docker push username/debian12 - ``` + ``` + docker push username/debian12 + ``` * You should now see your docker image on the [Docker Hub](https://hub.docker.com/) when you go into the menu option `My Profile`. * Note that you can access this link quickly with the following template: - * ``` - https://hub.docker.com/u/ - ``` + ``` + https://hub.docker.com/u/ + ``` @@ -265,13 +265,13 @@ We will now convert the Docker image into a Zero-OS flist. This part is so easy * Under `Name`, you will see all your available flists. * Right-click on the flist you want and select `Copy Clean Link`. This URL will be used when deploying on the ThreeFold Playground. We show below the template and an example of what the flist URL looks like. * Template: - * ``` - https://hub.grid.tf/<3BOT_name.3bot>/--.flist - ``` + ``` + https://hub.grid.tf/<3BOT_name.3bot>/--.flist + ``` * Example: - * ``` - https://hub.grid.tf/idrnd.3bot/username-debian12-latest.flist - ``` + ``` + https://hub.grid.tf/idrnd.3bot/username-debian12-latest.flist + ``` @@ -283,16 +283,14 @@ We will now convert the Docker image into a Zero-OS flist. This part is so easy * Choose your parameters (name, VM specs, etc.). * Under `flist`, paste the Debian flist from the TF Hub you copied previously. * Make sure the entrypoint is as follows: - * ``` - /sbin/zinit init - ``` + ``` + /sbin/zinit init + ``` * Choose a 3Node to deploy on * Click `Deploy` That's it! You can now SSH into your Debian deployment and change the world one line of code at a time! -* - ## Conclusion In this case study, we've seen the overall process of creating a new flist to deploy a Debian workload on a Micro VM on the ThreeFold Playground. diff --git a/collections/developers/flist/flist_hub/zos_hub.md b/collections/developers/flist/flist_hub/zos_hub.md index 8f79973..6b14f5a 100644 --- a/collections/developers/flist/flist_hub/zos_hub.md +++ b/collections/developers/flist/flist_hub/zos_hub.md @@ -118,25 +118,25 @@ See example below. The main template to request information from the API is the following: -```bash +``` curl -H "Authorization: bearer " https://hub.grid.tf/api/flist/me/ -X ``` For example, if we take the command `DELETE` of the previous section and we want to delete the flist `example-latest.flist` with the API Token `abc12`, we would write the following line: -```bash +``` curl -H "Authorization: bearer abc12" https://hub.grid.tf/api/flist/me/example-latest.flist -X DELETE ``` As another template example, if we wanted to rename the flist `current-name-latest.flist` to `new-name-latest.flist`, we would use the following template: -```bash +``` curl -H "Authorization: bearer " https://hub.grid.tf/api/flist/me//rename/ -X GET ``` To upload an flist to the ZOS Hub, you would use the following template: -```bash +``` curl -H "Authorization: bearer " -X POST -F file=@my-local-archive.tar.gz \ https://hub.grid.tf/api/flist/me/upload ``` \ No newline at end of file diff --git a/collections/developers/proxy/proxy.md b/collections/developers/proxy/proxy.md index 8962912..25d5c10 100644 --- a/collections/developers/proxy/proxy.md +++ b/collections/developers/proxy/proxy.md @@ -60,33 +60,33 @@ To start the services for development or testing make sure first you have all th - Clone this repo - ```bash + ``` git clone https://github.com/threefoldtech/tfgrid-sdk-go.git cd tfgrid-sdk-go/grid-proxy ``` - The `Makefile` has all that you need to deal with Db, Explorer, Tests, and Docs. - ```bash + ``` make help # list all the available subcommands. ``` - For a quick test explorer server. - ```bash + ``` make all-start e= ``` Now you can access the server at `http://localhost:8080` - Run the tests - ```bash + ``` make test-all ``` - Generate docs. - ```bash + ``` make docs ``` @@ -108,7 +108,7 @@ For more illustrations about the commands needed to work on the project, see the - You can either build the project: - ```bash + ``` make build chmod +x cmd/proxy_server/server \ && mv cmd/proxy_server/server /usr/local/bin/gridproxy-server @@ -117,7 +117,7 @@ For more illustrations about the commands needed to work on the project, see the - Or download a release: Check the [releases](https://github.com/threefoldtech/tfgrid-sdk-go/releases) page and edit the next command with the chosen version. - ```bash + ``` wget https://github.com/threefoldtech/tfgrid-sdk-go/releases/download/v1.6.7-rc2/tfgridclient_proxy_1.6.7-rc2_linux_amd64.tar.gz \ && tar -xzf tfgridclient_proxy_1.6.7-rc2_linux_amd64.tar.gz \ && chmod +x server \ @@ -128,7 +128,7 @@ For more illustrations about the commands needed to work on the project, see the - Create the service file - ```bash + ``` cat << EOF > /etc/systemd/system/gridproxy-server.service [Unit] Description=grid proxy server