Next revision | Previous revision |
gitlab-dashboard [2018/10/03 17:39] – created admin | gitlab-dashboard [2018/10/03 18:48] (current) – admin |
---|
| |
===== Install ''chilipie-kiosk'' ===== | ===== Install ''chilipie-kiosk'' ===== |
| |
| |
* Download the [[https://github.com/futurice/chilipie-kiosk#getting-started|chilipie-kiosk]] image | * Download the [[https://github.com/futurice/chilipie-kiosk#getting-started|chilipie-kiosk]] image |
* Boot up your Pi - Hit ''F11'' and then ''CTRL-L'' and enter the website you want to display in this case it will be http://localhost:3000 (URL of [[https://github.com/marcells/node-build-monitor|node-build-monitor]]) | * Boot up your Pi - Hit ''F11'' and then ''CTRL-L'' and enter the website you want to display in this case it will be http://localhost:3000 (URL of [[https://github.com/marcells/node-build-monitor|node-build-monitor]]) |
| |
===== Install NVM (Node Version Manager) ===== | ===== Install recent node version ===== |
| |
| To install and manage node version install NVM: |
| |
<code> | <code> |
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash |
| </code> |
| |
| Install node v10.11.0 |
| |
| <code> |
| nvm install v10.11.0 |
| </code> |
| |
| ===== Install node-build-monitor ===== |
| |
| Clone and setup code: |
| |
| <code> |
| sudo apt install git |
| git clone https://github.com/marcells/node-build-monitor.git |
| cd node-build-monitor |
| npm install |
| </code> |
| |
| Add config: |
| |
| Open ''node-build-monitor/app/config.json'' and add the following [[https://github.com/marcells/node-build-monitor#gitlab-on-premise-beta|config]] to ''services'' section: |
| |
| <code json> |
| { |
| "name": "GitLab", |
| "configuration": { |
| "url": "http://gitlab.example.com:8080", |
| "token": "secret_user_token", |
| "additional_query": "&search=gitlab-org&starred=true", |
| "numberOfPipelinesPerProject": 3, |
| "slugs": [ |
| { |
| "project": "gitlab-org/gitlab-ci-multi-runner", |
| "ref": "master" |
| } |
| ] |
| } |
| } |
| </code> |
| |
| Start node-build-monitor using ''npm run start'' and open http://localhost:3000 in your Pis browser |
| |
| To run it on boot insert this in ''/etc/rc.local'' before ''exit 0'': |
| |
| <code bash> |
| /home/pi/.nvm/versions/node/v10.11.0/bin/node /home/pi/node-build-monitor/app/app.js & |
| </code> |
| |
| The ''&'' will make this process run in background. The node version in your path depends on the version you installed. |
| |
| ====== Simple Script to automate node-build-monitor install ====== |
| |
| <code bash> |
| #!/bin/bash |
| |
| echo "Install nvm ..." |
| wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash |
| |
| export NVM_DIR="$HOME/.nvm" |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" |
| |
| echo "Install node ..." |
| nvm install v10.11.0 |
| |
| echo "Install node-build-monitor" |
| |
| sudo apt install git |
| cd ~/ |
| git clone https://github.com/marcells/node-build-monitor.git |
| cd ./node-build-monitor |
| npm install |
| |
| echo "Done ..." |
</code> | </code> |