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:
cd clouditor && go run cmd/engine/engine.go --db-in-memory
\ No newline at end of file
go run cmd/engine/engine.go --db-in-memory
\ No newline at end of file
......@@ -9,6 +9,7 @@
- gcc
- wget
- make
- protobuf-compiler
state: present
become: yes
- name: Download Golang installer
......@@ -26,10 +27,18 @@
git:
repo: https://github.com/clouditor/clouditor.git
dest: /home/vagrant/clouditor
force: yes
version: v1.3.9
- name: Copy Makefile
copy:
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
file:
path: /var/log/clouditor.log
......@@ -39,7 +48,7 @@
become: yes
- name: Run Clouditor in background
shell:
chdir: ~/clouditor
chdir: /home/vagrant/clouditor
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)"
# 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