-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpackage-registry.yml
62 lines (55 loc) · 1.72 KB
/
package-registry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
- name: Install DC/OS Package Registry
hosts: localhost
serial: 1
become: false
tasks:
- name: Connect to the cluster
include: connection.yml
- name: Enables Bootstrap Registry
dcos_package_repo:
name: Bootstrap Registry
url: https://registry.component.thisdcos.directory/repo
index: 0
state: present
- name: Create a group for Package Registry
dcos_iam_group:
gid: registry-account-group
description: Permissions for Package Registry
state: present
permissions:
- rid: dcos:adminrouter:ops:ca:rw
action: full
- name: Create service account for Package Registry
dcos_iam_serviceaccount:
sid: registry-account
description: 'Package Registry Service Account'
secret_path: dcos-registry/secret
groups:
- registry-account-group
state: present
- name: Ensure Package Registry is installed
dcos_package:
name: package-registry
app_id: dcos-registry
version: 0.2.0-SNAPSHOT-0.2.0-SNAPSHOT-523-ce1fb2d
state: present
options:
{
"registry":{
"service-account-secret-path": "dcos-registry/secret"
}
}
- name: Wait for Package Registry to come up
command: dcos registry describe --package-name test --package-version 0
register: command_result
failed_when: "command_result.stderr != 'Version [0] of package [test] not found'"
until: "command_result.stderr == 'Version [0] of package [test] not found'"
retries: 60
delay: 1
- name: Enables Package Registry
dcos_package_repo:
name: Package Registry
url: https://dcos-registry.marathon.l4lb.thisdcos.directory/repo
index: 0
state: present