Skip to content

Commit

Permalink
[SECURESIGN-1116] Add option to use external customer provisioned Red…
Browse files Browse the repository at this point in the history
…is (#14)

Add option to use external customer provisioned Redis
  • Loading branch information
fghanmi authored Jul 19, 2024
1 parent ce2a559 commit fd2fb11
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
11 changes: 9 additions & 2 deletions roles/tas_single_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ tas_single_node_cockpit:
tas_single_node_skip_os_install: false

tas_single_node_rekor_templates:
- manifests/rekor/redis-server.yaml
- manifests/rekor/rekor-server.yaml
- manifests/rekor/redis-server.j2
- manifests/rekor/rekor-server.j2

tas_single_node_rekor_redis:
database_deploy: true
redis:
address: rekor-redis-pod
port: 6379
password: password

tas_single_node_cockpit_enabled: true
tas_single_node_ctlog_enabled: true
Expand Down
6 changes: 3 additions & 3 deletions roles/tas_single_node/tasks/podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"{{ tas_single_node_trillian_enabled }}",
"{{ tas_single_node_rekor_enabled }}",
"{{ tas_single_node_ctlog_enabled }}",
"{{ tas_single_node_rekor_enabled }}",
"{{ tas_single_node_trillian_enabled }}",
"{{ tas_single_node_rekor_enabled and tas_single_node_rekor_redis.database_deploy }}",
"{{ tas_single_node_trillian_enabled and tas_single_node_trillian.database_deploy }}",
"{{ tas_single_node_tuf_enabled }}",
"{{ tas_single_node_trillian_enabled }}",
"{{ tas_single_node_tsa_enabled }}",
"true",
"{{ tas_single_node_tsa_enabled }}",
]
loop:
- "{{ tas_single_node_fulcio_server_image }}"
Expand Down
5 changes: 3 additions & 2 deletions roles/tas_single_node/tasks/podman/rekor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
state: started
systemd_file: redis
network: "{{ tas_single_node_podman_network }}"
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/rekor/redis-server.yaml') | from_yaml }}"
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/rekor/redis-server.j2') | from_yaml }}"
when: tas_single_node_rekor_redis.database_deploy

- name: Deploy Rekor Server Pod
ansible.builtin.include_tasks: podman/install_manifest.yml
Expand All @@ -33,5 +34,5 @@
state: started
systemd_file: rekor
network: "{{ tas_single_node_podman_network }}"
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/rekor/rekor-server.yaml') | from_yaml }}"
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/rekor/rekor-server.j2') | from_yaml }}"
configmap: "{{ tas_single_node_rekor_sharding_config }}"
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ spec:
- --appendonly
- "yes"
image: "{{ tas_single_node_redis_image }}"
{% if tas_single_node_rekor_redis.redis.password != "" %}
env:
- name: REDIS_PASSWORD
value: "{{ tas_single_node_rekor_redis.redis.password }}"
{% endif %}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 6379
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ spec:
- --trillian_log_server.address=trillian-logserver-pod
- --trillian_log_server.port=8091
- --trillian_log_server.sharding_config=/sharding/sharding-config.yaml
- --redis_server.address=rekor-redis
- --redis_server.port=6379
- --redis_server.address={{ tas_single_node_rekor_redis.redis.address }}
- --redis_server.port={{ tas_single_node_rekor_redis.redis.port }}
{% if tas_single_node_rekor_redis.redis.password != "" %}
- --redis_server.password={{ tas_single_node_rekor_redis.redis.password }}
{% endif %}
- --rekor_server.address=0.0.0.0
- --rekor_server.signer=memory
- --enable_retrieve_api=true
Expand Down

0 comments on commit fd2fb11

Please sign in to comment.