-
Notifications
You must be signed in to change notification settings - Fork 6
/
create-magpie-users
executable file
·123 lines (108 loc) · 4.43 KB
/
create-magpie-users
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/sh
#
# Batch create or delete magpie users using config file at
# /tmp/create_magpie_users/config.yml (configurable using MAGPIE_CLI_CONF env
# var).
#
# Should run from checkout on same host running Birdhouse to have access to
# env.local file for Magpie credentials. Else these can be provided via
# environment variables.
#
# Sample /tmp/create_magpie_users/config.yml:
# Full sample at
# https://github.com/Ouranosinc/Magpie/blob/master/config/config.yml:
#
# users:
# - username: bogus01
# password: min_12_length
# email: bogus@example.com
# group: users
# - username: bogus02
# password: min_12_length
# email: bogus@example.com
# group: users
# - username: bogus03
# password: min_12_length
# email: bogus@example.com
# group: users
#
# If a username already exist, will not modify it (old password is kept), nice!
#
# Sample usage: create-magpie-users [-d]
# -d: delete users instead of create
#
# Sample output against Magpie server 1.7.3:
#
# $ scripts/create-magpie-users
# + docker run --rm -it --name create_magpie_users -v /tmp/create_magpie_users:/tmp/create_magpie_users:rw pavics/magpie:2.0.0 magpie_cli batch_update_users https://pavics.ouranos.ca/magpie admin 'sanitized' -f /tmp/create_magpie_users/config.yml -o /tmp/create_magpie_users/
# Constant could not be found: MAGPIE_GITHUB_CLIENT_ID (using default: None)
# Constant could not be found: MAGPIE_GITHUB_CLIENT_SECRET (using default: None)
# Constant could not be found: WSO2_HOSTNAME (using default: None)
# Constant could not be found: WSO2_CLIENT_ID (using default: None)
# Constant could not be found: WSO2_CLIENT_SECRET (using default: None)