This repository was archived by the owner on Sep 5, 2023. It is now read-only.
File tree 7 files changed +63
-73
lines changed
7 files changed +63
-73
lines changed Original file line number Diff line number Diff line change 2
2
3
3
COMPILE_TYPE=$1
4
4
5
- source scripts/base.sh
5
+ COMPILE_PROTOs () {
6
+ protoc -I=. --cpp_out=. protos/state.proto
7
+ protoc -I=. --cpp_out=. protos/command.proto
8
+ protoc -I=. --cpp_out=. protos/debug.proto
9
+ protoc -I=. --cpp_out=. protos/control.proto
10
+
11
+ mkdir -p src/protos
12
+ mkdir -p include/protos
13
+
14
+ mv protos/* .pb.cc src/protos
15
+ mv protos/* .pb.h include/protos
16
+ }
17
+
18
+ CMAKE () {
19
+ cmake ..
20
+ make
21
+ cd ..
22
+ }
23
+
24
+ CMAKE_INSTALL () {
25
+ cmake -D RELEASE=ON ..
26
+ make install
27
+ cd ..
28
+ }
29
+
30
+ CREATE_BUILD_FOLDER () {
31
+ rm -R build
32
+ mkdir -p build
33
+ cd build
34
+ }
35
+
36
+ INIT_SUBMODULES () {
37
+ git submodule init;
38
+ git submodule update;
39
+ }
40
+
41
+ INSTALL_ANSIBLE () {
42
+ {
43
+ apt-get update
44
+ apt-get install -y python-pip python-dev
45
+ } || {
46
+ dnf update -y
47
+ dnf install -y python-pip python-dev
48
+ } || {
49
+ yum update
50
+ yum install -y python-pip python-dev
51
+ }
52
+
53
+ {
54
+ sudo -H pip3 install ansible==2.7.8.0
55
+ } || {
56
+ pip3 install ansible==2.7.8.0
57
+ } || {
58
+ sudo -H pip install ansible==2.7.8.0
59
+ } || {
60
+ pip install ansible==2.7.8.0
61
+ }
62
+ }
6
63
7
64
INSTALL () {
65
+ INSTALL_ANSIBLE;
66
+
8
67
ansible-playbook scripts/ansible/instala.yml
9
68
10
69
INIT_SUBMODULES;
70
+ COMPILE_PROTOs;
71
+ CREATE_BUILD_FOLDER;
11
72
12
73
if [[ $COMPILE_TYPE == " development" ]];
13
74
then
Original file line number Diff line number Diff line change 1
1
FROM debian:9
2
2
3
- # Instala Base
4
- RUN apt-get update
5
- RUN apt-get install -y python-pip python-dev
6
-
7
- # Instala Ansible
8
- RUN pip install ansible==2.7.8.0
9
-
10
3
# Copia tudo para o container
11
4
COPY . /vss-core-debian9
12
5
WORKDIR /vss-core-debian9
13
6
14
7
# Adiciona permissão de execução dos shellscripts
15
8
RUN chmod +x /vss-core-debian9/configure.sh
16
9
RUN chmod +x /vss-core-debian9/entrypoint.sh
17
- RUN chmod +x /vss-core-debian9/scripts/protos.sh
18
- RUN chmod +x /vss-core-debian9/scripts/base.sh
19
10
20
11
# Executa a instalação na criação dos containers
21
12
RUN /vss-core-debian9/configure.sh development
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:16.04
2
2
3
- # Instala Base
4
- RUN apt-get update
5
- RUN apt-get install -y python-pip python-dev
6
-
7
- # Instala Ansible
8
- RUN pip install ansible==2.7.8.0
9
-
10
3
# Copia tudo para o container
11
4
COPY . /vss-core-ubuntu16
12
5
WORKDIR /vss-core-ubuntu16
13
6
14
7
# Adiciona permissão de execução dos shellscripts
15
8
RUN chmod +x /vss-core-ubuntu16/configure.sh
16
9
RUN chmod +x /vss-core-ubuntu16/entrypoint.sh
17
- RUN chmod +x /vss-core-ubuntu16/scripts/protos.sh
18
- RUN chmod +x /vss-core-ubuntu16/scripts/base.sh
19
10
20
11
# Executa a instalação na criação dos containers
21
12
RUN /vss-core-ubuntu16/configure.sh development
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:18.04
2
2
3
- # Instala Base
4
- RUN apt-get update
5
- RUN apt-get install -y python-pip python-dev
6
-
7
- # Instala Ansible
8
- RUN pip install ansible==2.7.8.0
9
-
10
3
# Copia tudo para o container
11
4
COPY . /vss-core-ubuntu18
12
5
WORKDIR /vss-core-ubuntu18
13
6
14
7
# Adiciona permissão de execução dos shellscripts
15
8
RUN chmod +x /vss-core-ubuntu18/configure.sh
16
9
RUN chmod +x /vss-core-ubuntu18/entrypoint.sh
17
- RUN chmod +x /vss-core-ubuntu18/scripts/protos.sh
18
- RUN chmod +x /vss-core-ubuntu18/scripts/base.sh
19
10
20
11
# Executa a instalação na criação dos containers
21
12
RUN /vss-core-ubuntu18/configure.sh development
Original file line number Diff line number Diff line change 1
1
- name : Aguarde verificando conexao.
2
2
connection : local
3
3
hosts : localhost
4
+ become : yes
4
5
roles :
5
6
- common
6
7
# - docker
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments