11516e0e4b
This renames zk-ca to opendev-ca and allows us to operate more than one ca on bridge. This way we can keep the CAs for ZooKeeper and Jaeger distinct (so that a compromise of the jaeger server could not be used to access the ZooKeeper cluster). This also starts a new jaeger-ca and uses it on the Jaeger server. Change-Id: I4e5bc4e3ccd78284ce785c971f7e6ad6e721f887
89 lines
1.8 KiB
YAML
89 lines
1.8 KiB
YAML
- name: Create jaeger group
|
|
group:
|
|
name: "{{ jaeger_group }}"
|
|
gid: "{{ jaeger_gid }}"
|
|
system: yes
|
|
|
|
- name: Create jaeger user
|
|
user:
|
|
name: "{{ jaeger_user }}"
|
|
group: "{{ jaeger_group }}"
|
|
uid: "{{ jaeger_uid }}"
|
|
home: "/home/{{ jaeger_user }}"
|
|
create_home: yes
|
|
shell: /bin/bash
|
|
system: yes
|
|
|
|
- name: Ensure docker-compose directory exists
|
|
file:
|
|
state: directory
|
|
path: /etc/jaeger-docker
|
|
|
|
- name: Write docker-compose file
|
|
template:
|
|
src: docker-compose.yaml.j2
|
|
dest: /etc/jaeger-docker/docker-compose.yaml
|
|
|
|
- name: Ensure data directory exists
|
|
file:
|
|
state: directory
|
|
path: /var/jaeger/badger
|
|
owner: "{{ jaeger_user }}"
|
|
group: "{{ jaeger_group }}"
|
|
mode: "0750"
|
|
|
|
- name: Generate GRPC TLS cert
|
|
include_role:
|
|
name: opendev-ca
|
|
vars:
|
|
opendev_ca_name: jaeger
|
|
opendev_ca_cert_dir: /var/jaeger/tls
|
|
opendev_ca_cert_dir_owner: "{{ jaeger_user }}"
|
|
opendev_ca_cert_dir_group: "{{ jaeger_group }}"
|
|
|
|
- name: Install apache2
|
|
apt:
|
|
name:
|
|
- apache2
|
|
- apache2-utils
|
|
state: present
|
|
|
|
- name: Apache modules
|
|
apache2_module:
|
|
state: present
|
|
name: "{{ item }}"
|
|
loop:
|
|
- rewrite
|
|
- proxy
|
|
- proxy_http
|
|
- ssl
|
|
- headers
|
|
|
|
- name: Copy apache config
|
|
template:
|
|
src: tracing.vhost.j2
|
|
dest: /etc/apache2/sites-enabled/000-default.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: jaeger Reload apache2
|
|
|
|
- name: Run docker-compose pull
|
|
shell:
|
|
cmd: docker-compose pull
|
|
chdir: /etc/jaeger-docker/
|
|
|
|
- name: Run docker-compose up
|
|
shell:
|
|
cmd: docker-compose up -d
|
|
chdir: /etc/jaeger-docker/
|
|
|
|
- name: Wait for jaeger to start
|
|
wait_for:
|
|
port: 16686
|
|
timeout: 60
|
|
|
|
- name: Run docker prune to cleanup unneeded images
|
|
shell:
|
|
cmd: docker image prune -f
|