medal-data:system-setup
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| medal-data:system-setup [2022/01/17 14:29] – created arnaudpoletto | medal-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. | ||
| - | |||
| - | |||
| - | ===== Responsibilities and Procedures ===== | ||
| - | |||
| - | - Basic requirements | ||
| - | * Server Linux =8gb ram | ||
| - | * Storage= 300 gb | ||
| - | * Operating System = ubuntu 18.04 | ||
| - | |||
| - | - Software Requirements. | ||
| - | * Docker | ||
| - | - check if docker is installed in the server by typing on the terminal “docker” | ||
| - | - If not Installed open command line (ubuntu terminal) | ||
| - | - Type “sudo apt update” to update ubuntu server | ||
| - | - Install a few prerequisite packages which let apt use packages over HTTPS by typing “sudo apt install apt-transport-https ca-certificates curl software-properties-common” | ||
| - | - add the GPG key for the official Docker repository to your system by typing “curl -fsSL https:// | ||
| - | - Add the Docker repository to APT sources “sudo add-apt-repository "deb [arch=amd64] https:// | ||
| - | - Update the package database with the Docker packages from the newly added repo “sudo apt update” | ||
| - | - Make sure you are about to install from the Docker repo instead of the default Ubuntu repo “apt-cache policy docker-ce” | ||
| - | - Finally, install Docker “sudo apt install docker-ce” | ||
| - | - Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running “sudo systemctl status docker” | ||
| - | - For more information, | ||
| - | * 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:// | ||
| - | 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/ | ||
| - | 6. On you user terminal, | ||
| - | 7. Add the project to git “git add. /” | ||
| - | 8. Connect local git with the domain “git remote add dokku dokku@your_domain: | ||
| - | 9. Commit to git “git commit -m " | ||
| - | 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: | ||
| - | 13. Create database “dokku mysql: | ||
| - | 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/ | ||
| - | |||
| - | 17. on the user terminal “git add ./” | ||
| - | 18. commit “git commit -m " | ||
| - | 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: | ||
| - | 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-> | ||
| - | 4. Type “$user-> | ||
| - | 5. Type “$user-> | ||
| - | 6. Type “$user-> | ||
| - | 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.1642426181.txt.gz · Last modified: 2022/01/17 14:29 by arnaudpoletto
