User Tools

Site Tools


medal-data:system-setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
medal-data:system-setup [2022/01/17 14:40] arnaudpolettomedal-data:system-setup [2022/01/19 09:39] (current) – removed arnaudpoletto
Line 1: Line 1:
-====== Setup of medAL-data System ====== 
- 
-===== Purpose and scope ===== 
- 
-In this document, you will learn how to perform the basic setup of the MainData System.  
- 
- 
- 
- 
-===== Requirements ===== 
- 
-    * Server Linux =8gb ram 
-    * Storage= 300 gb 
-    * Operating System = ubuntu 18.04 
- 
- 
- 
- 
-===== Install Docker ===== 
- 
-  - To update ubuntu server, type: <code>sudo apt update</code> 
-  - Install a few prerequisite packages which let apt use packages over HTTPS by typing: <code>sudo apt install apt-transport-https ca-certificates curl software-properties-common</code> 
-  - Add the GPG key for the official Docker repository to your system by typing: <code>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</code> 
-  - Add the Docker repository to APT sources: <code>sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"</code> 
-  - Update the package database with the Docker packages from the newly added repository: <code>sudo apt update</code> 
-  - Make sure you are about to install from the Docker repository instead of the default Ubuntu repository: <code>apt-cache policy docker-ce</code> 
-  - Finally, install Docker: <code>sudo apt install docker-ce</code> 
-  - Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running: <code>sudo systemctl status docker</code> 
-For more information, you can check on this site (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04) 
- 
- 
- 
- 
-===== Install Nginx ===== 
-      - Check if nginx is installed on the server by typing in the terminal “systemctl status nginx” 
-      - If it is not installed open terminal 
-      - Install nginx “sudo apt install nginx” 
-      - Enable nginx in the firewall by typing “sudo ufw allow 'Nginx Full' 
-    * Dokku 
-      - Check if Dokku is installed on the server by typing in the terminal “dokku -v” 
-      - If it is not installed open terminal 
-      - Install dokku “wget https://raw.githubusercontent.com/dokku/dokku/v0.21.4/bootstrap.sh; 
-sudo DOKKU_TAG=v0.21.4 bash bootstrap.sh” 
-      - Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings.            
-      - Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin. 
-    * Installation of MainData. 
-- Requirements 
-• You must have the MainData Project folder 
-• Git must be installed on your laptop 
- 
-- Installation steps 
-1. Open command prompt (for windows) or terminal (for Linux and Mac) 
-2. Navigate to the MainData project folder (Parent Diretory). (Let’s call this user terminal) 
-3. Open another terminal/ Command Prompt and log into the server as root (let’s call it Server terminal) 
-4. On the Server terminal, create an app by “ ” 
-5. Specify the web server type that will be running “echo 'web: vendor/bin/heroku-php-apache2 public/' >> Procfile” 
-6. On you user terminal,initialize git "git init” 
-7. Add the project to git “git add. /” 
-8. Connect local git with the domain “git remote add dokku dokku@your_domain: Main-Data”.Your_domain means the domain of the server 
-9. Commit to git “git commit -m "Initial commit" 
-10. For the registration of the app on dokku Server, copy the value of APP_KEY variable in the .env file located in the root directory of your Laravel Project. Then, login to your VPS and register the APP_KEY environmental variable for your app “dokku config:set blog APP_KEY={{ key }}”.Replace key with the actual APP_KEY 
-11. Push the application on dokku with “git push dokku master” 
-12. Install the postgres plugin “sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres” 
-13. Create database “dokku mysql:create main-data-Db” 
-14. Link database service to our application “dokku mysql:link main-data-Db Main-Data” 
-15. Type “dokku mysql:info blogdb –dsn” and obtain the value from that and type in “dokku config:set blog DATABASE_URL={{ value }}” with value as the value above 
-16. go back to your application on local, and modify the config/database.php file in such a way that the postgres section looks like below 
-  
-17. on the user terminal “git add ./” 
-18. commit “git commit -m "Modified config/database.php file" 
-19. push the commit “git push dokku master” 
-20. finally migrate the database “dokku run Main-Data php artisan migrate” 
-6. Domain set up 
-1. On Your Server Terminal 
-2. Set domain “sudo domains:set Main-Data {{domain}}” where domain is the domain for MainData 
-- Setting up letsencrypt with Dokku 
-1. On your Server Terminal.Install letsencrypt plugin with “sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git” 
-2. Install certificate with “sudo dokku letsencrypt Main-Data” 
-3. Open your browser and test the system 
-- Creating an Admin  
-1. On your server terminal “sudo dokku run Main-Data php artisan tinker”  
-2. Type “$user=new User;” for a new user object 
-3. Type “$user->name=”{{user_name}}”;” for the ADMIN name 
-4. Type “$user->email=”{{user_email}}”;” for the ADMIN email 
-5. Type “$user->password=Hash::make(“{{user_password}}”);” for the ADMIN password 
-6. Type “$user->syncRoles(“ADMIN”);” To make this user an admin 
-7. Try to access the web and log in with this user in the system 
- 
-Administrative information 
- 
- Name Signature Date 
-Author Ibrahim Evans 12.11.2020 
-Revised by  
-Approved by  
-  
- 
-Document change control: 
-Version Changes Name Date 
-01 New Document Ibrahim Evans 12.11.2020 
-  
-  
-  
-  
- 
-Distribution of SOP: 
-Name Role Health facility / Institute Date 
-  
-  
-  
-  
-  
-*Note: When printing and distributing the SOP, the administrative information page does not need to be included. 
- 
- 
  
medal-data/system-setup.1642426802.txt.gz · Last modified: 2022/01/17 14:40 by arnaudpoletto