Skip to content

Commit 0adc159

Browse files
authored
Merge pull request #1603 from unfetter-discover/rc-0.3.12
Rc 0.3.12 into master
2 parents 9e8cff6 + 8eeaa23 commit 0adc159

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+397
-74743
lines changed

ansible/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ backup/*
1010
roles/gateway/files/conf.d/default.conf
1111
roles/gateway/files/ui-dist/
1212

13+
roles/threat-ingest/files/**/*
14+
1315
host_vars/*
1416
!host_vars/demo-file.yml
1517
src/*

ansible/build-prod.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
####################################################################################
2-
# This playbook only builds the docker images locally
3-
#
4-
####################################################################################
2+
# This playbook builds, but does not deploy, docker containers. It will
3+
# also build the production UI versions.
4+
#####################################################################################
55

66
- name: Build the Docker images only.
77
hosts: build
88
tasks:
9-
- name: Iterate over group variables
10-
debug:
11-
var: item
12-
with_items: "{{ hostvars | to_nice_json }}"
139
- name: Start running the commands
1410
import_tasks: discover-tasks.yml
1511
- include_role:

ansible/discover-tasks.yml

+2-21
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,13 @@
3333
ansible_python_interpreter: "{{ overrides.ansible_python_interpreter | default(ansible_python_interpreter) }}"
3434
gateway_tag: "{{ overrides.gateway_tag | default(gateway_tag) }}"
3535
https_proxy_url: "{{ overrides.https_proxy_url | default(https_proxy_url) }}"
36+
backup_directory: "{{ overrides.backup_directory | default(backup_directory) }}"
3637

37-
# Displaying the variables.
38-
- debug:
39-
msg:
40-
- "docker_tag: {{ docker_tag }} "
41-
- "gateway_tag: {{ gateway_tag }} "
42-
- "build_action: {{ build_action }}"
43-
- "run_action: {{ run_action }}"
44-
- "use_unfetter_ui: {{ use_unfetter_ui }}"
45-
- "use_uac: {{ use_uac }}"
46-
- "use_taxii: {{ use_taxii }}"
47-
- "registry: {{ registry }}"
48-
- "prepath: {{ prepath }}"
49-
- "remote home: {{ ansible_env.HOME }}"
50-
- "ansible_host = {{ ansible_host }}"
51-
- "ansible_ssh_private_key_file = {{ ansible_ssh_private_key_file }}"
52-
- "ansible_connection = {{ ansible_connection }}"
53-
- "run_mode = {{ run_mode }}"
54-
- "https_proxy_url = {{ https_proxy_url }}"
55-
38+
- include_tasks: "task-print-variables.yml"
5639
- include_role:
5740
name: common
5841
- include_role:
5942
name: processor
60-
- include_role:
61-
name: openssl
6243
- include_role:
6344
name: pattern-handler
6445
- include_role:

ansible/group_vars/all.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# For version 0.3.11 of Unfetter Discover
2+
# For version 0.3.12 of Unfetter Discover
33

44
run_action: true
55
# use_taxii tells Ansible if the Taxii server should be running. At the moment, this will always be false.
@@ -18,7 +18,7 @@ use_taxii_tls: false
1818
# 0 means there is no size limit
1919
attachments_max_size: 0
2020
ansible_python_interpreter: python
21-
docker_tag: "0.3.11"
21+
docker_tag: "0.3.12"
2222
gateway_tag: "{{ docker_tag }}.uac"
2323

2424
legacy: false

ansible/group_vars/demo.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
---
2-
# For version 0.3.11 of Unfetter Discover
32

43
use_uac: false

ansible/group_vars/development.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# For version 0.3.11 of Unfetter Discover
2+
# For version 0.3.12 of Unfetter Discover
33

44
# For development, you can use the local ansible location as default
55
ansible_host: "127.0.0.1"
@@ -16,7 +16,7 @@ ansible_connection: "local"
1616
prepath: '../../'
1717

1818
# For testing, the API_Domain is "localhost"
19-
docker_tag: "0.3.11.beta.1"
19+
docker_tag: "0.3.12.beta.1"
2020
gateway_tag: "{{ docker_tag }}.uac"
2121

2222

ansible/group_vars/production.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ansible_ssh_private_key_file: ""
1313
ansible_connection: "local"
1414
# If local, then use ../../ or the full directory path to the directory above the "unfetter" directory.
1515
prepath: '../../'
16-
docker_tag: "0.3.11"
16+
docker_tag: "0.3.12"
1717
gateway_tag: "{{ docker_tag }}.uac"
1818

1919
# Docker Tag specifies what will be the name of the developed tag.

ansible/host_vars/demo-file.yml

+65-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,70 @@
11
---
2-
remote_tmp: ""
3-
ansible_connection: "ssh"
4-
backup_directory: "{{ remote_tmp }}/unfetter"
5-
ansible_user: "ansible"
6-
ansible_ssh_private_key_file: "xxxxxxx"
2+
3+
######################################################################################################
4+
5+
# This file is a demonstration of the variables you may need to override in order to customize
6+
# Unfetter deployment to meet your needs.
7+
8+
# Each file in the host_vars directory should be named after your deployment type
9+
# - prod-uac.yml
10+
# - prod-legacy-demo.yml
11+
# - prod-legacy-uac.yml
12+
# - prod-demo.yml
13+
14+
# For developers, a 'build.yml' may also be necessary.
15+
16+
# Every variable in a hosts file will override all group vars. Consider the group_vars files to be default values
17+
18+
######################################################################################################
19+
20+
21+
22+
23+
######################################################################################
24+
# Connection Variables
25+
# These variables are needed to connect to your system that is running Unfetter. By default,
26+
# the group_vars will set the variables to support a local deployment. Meaning, that ansible is
27+
# executed on the same system that you will run Unfetter.
28+
29+
# For a local system, the values will be
30+
31+
# ansible_connection: "local"
32+
# ansible_user: ""
33+
# ansible_ssh_private_key_file: ""
34+
# ansible_host: "127.0.0.1"
35+
# backup_directory: "{{ playbook_dir }}/backup"
36+
37+
# For remote system accessed over SSH, which is where Ansible excels, you would change those values to the following:
38+
######################################################################################
39+
40+
# Tell Ansible host how to connect with the host. ssh
41+
ansible_connection: "ssh"
42+
43+
# The user that the host running ansible will connect to the remote system. You are responsible
44+
# for creating this user. For AWS, it is likely ec2-user
45+
ansible_user: "ec2-user"
46+
47+
# The private key file and location
48+
ansible_ssh_private_key_file: "~/.ssh/id_rsa"
49+
50+
# What is the host IP that you will SSH into.
751
ansible_host: "xx.xx.xxx.xxx"
8-
api_domain: "{{ ansible_host }}"
9-
ui_domain: "{{ ansible_host }}"
1052

53+
# The backup directory is where backup files are stored, and where Unfetter will look for the files to restore
54+
# data from. For remote deployments, there is no ansible directory so {{ playbook_dir }} has to be overwritten
55+
backup_directory: "/tmp/backup"
56+
57+
######################################################################################
58+
# In UAC deployed, these values are needed as the domain that people are accessing Unfetter. If you are running
59+
# locally, as the default setting, this is localhost. For a real deployment, it is the domain name or IP address
60+
61+
api_domain: "www.example.com"
62+
ui_domain: "www.example.com"
63+
64+
65+
######################################################################################
1166
# If you are using a proxy URL, you can change that here, otherwise, leave it commented out
67+
######################################################################################
68+
69+
1270
# https_proxy_url: "http://host:port"

ansible/roles/api/tasks/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
name: "{{ image_name }}"
44
state: present
55
path: "{{ path }}"
6+
buildargs:
7+
https_proxy_url: "{{ https_proxy_url }}"
68
when: "build_action == 'local'"
79

810
- name: "Pull {{ container_name }}"
911
docker_image:
1012
name: "{{ image_name }}"
1113
state: present
1214
pull: yes
15+
buildargs:
16+
https_proxy_url: "{{ https_proxy_url }}"
1317
when: "build_action == 'pull'"
1418

1519
# Creating the list of volumes has been difficult.

ansible/roles/explorer/tasks/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
state: present
88
path: "{{ path }}"
99
dockerfile: "{{ dockerfile }}"
10+
buildargs:
11+
https_proxy_url: "{{ https_proxy_url }}"
1012
when: "build_action == 'local'"
1113

1214

@@ -16,6 +18,8 @@
1618
name: "{{ image_name }}"
1719
state: present
1820
pull: yes
21+
buildargs:
22+
https_proxy_url: "{{ https_proxy_url }}"
1923
when: "build_action == 'pull'"
2024

2125

0 commit comments

Comments
 (0)