You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/open-sourcing-workshops-on-demand-part2-deploying-the-backend.md
+16-63Lines changed: 16 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,7 @@ It provides:
60
60
* A fail2ban service
61
61
* An Admin user to manage everything
62
62
* A set of scripts to handle different tasks such as:
63
+
63
64
* Notebooks deployment
64
65
* Jupyterhub compliancy
65
66
* Users compliancy
@@ -74,10 +75,10 @@ Before cloning the backend repository, you will need to prepare the server th
74
75
1. In order to setup the backend server, you will need:
75
76
76
77
* A fresh OS install on physical / virtualized server running Ubuntu 20.04 or Centos 7.9 leveraging any deployment mechanism of your choice.(e.g. iLO, vagrant, etc.). You may even use this [vagrant file](https://github.com/Workshops-on-Demand/wod-backend/blob/main/install/Vagrantfile) to automatically generate a complete setup leveraging vagrant, libvirt and QEMU/KVM.
77
-
78
78
* A Linux account with sudo priviledges on your Linux distro. Name it `install`
79
79
80
80
**Note:** In order to support 100 concurrent users, you need:
[](https://github.com/Workshops-on-Demand/wod-backend/blob/main/INSTALL.md#for-private-based-workshops-on-demand-private-backend--private-workshops-or-if-you-need-to-modify-defaults)Once you are done with the files, you can can proceed with the installation itself. The installation is based on a common install script [install.sh ](https://github.com/Workshops-on-Demand/wod-backend/blob/main/install/install.sh)that allows the deployment of the different parts of the solution. It can be called as follows:
* Creates an admin user as defined upper (default is `wodadmin`) with sudo rights
315
279
* Calls the `install-system-common.sh` script that performs the following tasks:
280
+
316
281
* Cleanup
317
282
* Github repos cloning (leveraging install.repo file) : public Backend and public Private repos
318
283
* Create ssh keys for wodadmin
319
284
* Creates GROUPNAME variables
320
285
* Creates Ansible inventory files
321
-
322
286
* Calls the `install_system.sh` script with the type (backend, frontend, etc..) that performs the following tasks:
287
+
323
288
* Install the necessary stack based on selected type
324
289
* Create a `wod.sh` script in `wod-backend` directory to be used by all other scripts
325
290
* Source the `wod.sh` file
326
291
* Setup Ansible-galaxies (`community.general` and `posix`)
327
292
* Setup Ansible and call the playbook `install_<type>.yml` followed by the `ansible\_check\_<type>.yml`
328
293
329
294
At the end of the installation process:
295
+
330
296
* you will have a JupyterHub server running on port 8000
331
297
* You will get a new `wodadmin` user (Default admin)
332
298
* You will get a set of 20 students (Default value)
@@ -343,45 +309,32 @@ If you need to develop private content that cannot be shared with the wider Open
343
309
344
310
### **How to handle private-content based Workshops-on-Demand**
345
311
346
-
##### *(private backend + private workshops on top of default public backend and notebooks)*
312
+
#### *(private backend + private workshops on top of default public backend and notebooks)*
347
313
348
314
The principle remains similar, with a few differences explained below.
349
315
350
316
* You will start by forking the following public private [repo](https://github.com/Workshops-on-Demand/wod-private.git) on Github under your own Github account (we will refer to it as `Account`).
* Edit the `all.yml` and `<groupname>` files to customize your setup. This variable `<groupname>` defines possible backend server in your environement. By default, the project comes with a sample working file named `production` in `ansible/group-vars`. But you could have multiple. In our case, we have defined `sandbox`, `test`, `staging` and several `production` files, all defining a different backend environment. These files will be used to override the default values specified by the public version delivered as part of the default public installation.
359
319
* Commit and push changes to your repo.
360
320
* Create an `install.priv` file located in `install` directory when using a private repo (consider looking at [install.repo](https://github.com/Workshops-on-Demand/wod-backend/blob/main/install/install.repo) file for a better understanding of the variables).
361
321
322
+
* Define the WODPRIVREPO and WODPRIVBRANCH variables as follows:
362
323
363
-
* Define the WODPRIVREPO and WODPRIVBRANCH variables as follows:
Please refer to the following [url](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to generate a `token` file in `install` directory of WoD-backend:
371
330
372
331
* Edit the `install.priv` file located in `install` directory of WoD-backend:
373
332
374
-
* Create line before variable declaration: ``token=`cat $EXEPATH/token` ``
375
-
376
-
* Use the token in the url WODPRIVREPO="git clone https://user:[email protected]/Account/wod-private.git wod-private"
333
+
* Create line before variable declaration: ``token=`cat $EXEPATH/token` ``
334
+
* Use the token in the url WODPRIVREPO="git clone https://user:[email protected]/Account/wod-private.git wod-private"
377
335
378
336
You are now ready to perform the installation again to support a private repository.
Please note that this setup phase can be conccurent with the public setup phase. Indeed, the install script should detect the presence of the private repository owing to the presence of the install.priv file. It will automatically adjust the different scripts and variables to add the relevant content. It will actually overload some of the variables with private ones.
386
339
387
340
You now have a working Workshops-on-Demand backend server in place. Congratulations! The next article in the series will help you better understand the lifecycle of the backend server. How does a workshop registration work from the backend server 's side? How do you manage this server on a daily basis? How and when do you need to update it ? All these questions will be answered in the next article. And from there, we will move to the frontend side of things and finally to a workshop's creation process.
0 commit comments