Skip to content
Snippets Groups Projects
Commit 1974fa65 authored by Zitnik, Anze's avatar Zitnik, Anze
Browse files

Update ansible tasks for installing and running clouditor. Using clouditor v1.3.9.

parent 0bc1f0b7
No related branches found
No related tags found
No related merge requests found
build:
go install google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/googleapis/gnostic/apps/protoc-gen-openapi
go generate ./... && go build ./...
run: run:
cd clouditor && go run cmd/engine/engine.go --db-in-memory go run cmd/engine/engine.go --db-in-memory
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
- gcc - gcc
- wget - wget
- make - make
- protobuf-compiler
state: present state: present
become: yes become: yes
- name: Download Golang installer - name: Download Golang installer
...@@ -26,10 +27,18 @@ ...@@ -26,10 +27,18 @@
git: git:
repo: https://github.com/clouditor/clouditor.git repo: https://github.com/clouditor/clouditor.git
dest: /home/vagrant/clouditor dest: /home/vagrant/clouditor
force: yes
version: v1.3.9
- name: Copy Makefile - name: Copy Makefile
copy: copy:
src: ./clouditor/Makefile src: ./clouditor/Makefile
dest: ~/Makefile dest: /home/vagrant/clouditor/Makefile
- name: Build Clouditor
make:
chdir: /home/vagrant/clouditor
target: build
environment:
PATH: "{{ ansible_env.PATH }}:/home/vagrant/.go/bin:/home/vagrant/go/bin"
- name: Create Clouditor log file - name: Create Clouditor log file
file: file:
path: /var/log/clouditor.log path: /var/log/clouditor.log
...@@ -39,7 +48,7 @@ ...@@ -39,7 +48,7 @@
become: yes become: yes
- name: Run Clouditor in background - name: Run Clouditor in background
shell: shell:
chdir: ~/clouditor chdir: /home/vagrant/clouditor
executable: /bin/bash executable: /bin/bash
cmd: "(nohup ~/.go/bin/go run cmd/engine/engine.go --db-in-memory </dev/null >/var/log/clouditor.log 2>&1 & sleep 1)" cmd: "(nohup ~/.go/bin/go run cmd/engine/engine.go --db-in-memory </dev/null >/var/log/clouditor.log 2>&1 & sleep 1)"
# see https://ansibledaily.com/execute-detached-process-with-ansible/ # see https://ansibledaily.com/execute-detached-process-with-ansible/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment