Add automation 3rd party software install script

pull/27/head
HardiReady 2018-02-11 12:26:53 +01:00
parent eb3514c075
commit 553dc492a6
2 changed files with 48 additions and 21 deletions

View File

@ -1,36 +1,29 @@
# Operation Pandora Trigger Commandcenter # Operation Pandora Trigger Commandcenter
[MEAN Application](http://mean.io/) created for [www.operation-pandora.com](www.operation-pandora.com) Arma3 Community [MEAN Application](http://mean.io/) created for [www.operation-pandora.com](https://www.operation-pandora.com) Arma3 Community
## Installation ## Installation
### Setup mongoDB ### Setup 3rd Party Software
https://docs.mongodb.com/manual/administration/install-community/ Run the installation script located in the docs folder:
### Setup node and npm ./docs/opt-cc-environment/3rd-party-install
sudo apt-get install npm nodejs-legacy It installs NPM, Node and MongoDB on latest versions.
In addition, it sets up the mongo deamon to start up automatically with the system.
update to latest npm version
sudo npm install -g npm@latest
update node to latest version
sudo npm install -g n@latest
n latest
check versions
npm -v
node -v
## Development and Execution ## Development and Execution
### Run in dev mode Before running any execution run
npm install
inside the main folder to trigger all needed npm package installations for the program execution.
### Run in Dev Mode
*TODO* *TODO*
### Run in Production ### Run in Production
@ -47,4 +40,4 @@ Main concept for API Server, pagination and MongoDB usage by [Prof. Dr.-Ing. Joh
All endpoints, signature image builder and Arma3 RPT-Log parsing by [Florian Hartwich](https://de.linkedin.com/in/florian-hartwich-b67b02125) All endpoints, signature image builder and Arma3 RPT-Log parsing by [Florian Hartwich](https://de.linkedin.com/in/florian-hartwich-b67b02125)
### Angular 5 Frontend (`/static`) ### Angular 5 Frontend (`/static`)
published under [MIT License](https://opensource.org/licenses/MIT) published under [MIT License](https://opensource.org/licenses/MIT)

View File

@ -0,0 +1,34 @@
#!/bin/bash
#####################################################
###### INSTALL ALL REQUIRED 3RD-PARTY SOFTWARE ######
#####################################################
# MONGO DB COMMUNITY
# NPM
# NODE
# mongodb key & repo
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | \
sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
# install from apt
sudo apt-get update
sudo apt-get install -y mongodb-org npm
# enable mongod for autostart
sudo systemctl enable mongod.service
# install latest node version
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.nvm/nvm.sh
nvm install stable
sudo ln -s ~/.nvm/versions/node/$(node -v)/bin/node /usr/bin/node
# upgrade to latest npm version
sudo npm install -g npm@latest
npm -v
node -v