This repository has been archived by the owner on Nov 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mysecrets_sample
214 lines (194 loc) · 5.6 KB
/
mysecrets_sample
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#!/usr/bin/env bash
#******************************************************************************
# Copyright 2020 Clark Hsu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************
# How To
# mkdir -p ${HOME}/.my_libs/bash/
# cp mysecrets_template ${HOME}/.my_libs/bash/mysecrets
#******************************************************************************
#echo "Begin: $(basename "${0}")"
#set -e # Exit on error On
#set -x # Trace On
#******************************************************************************
# # Master Account
# MASTER_USER=
# MASTER_PASSWORD=
PASSWORD=
# Admin Account
if [ "${OS_ADMIN}" == "" ]; then
OS_ADMIN="admin" # admin
fi
if [ "${OS_ADMIN_PASSWORD}" == "" ]; then
OS_ADMIN_PASSWORD=
fi
# OS User Account
if [ "${USER_HOME}" == "" ]; then
USER_HOME='/var/lib' # /home | /var/lib
fi
if [ "${OS_USER}" == "" ]; then
OS_USER="tester" # tester
fi
if [ "${OS_USER_GROUP}" == "" ]; then
OS_USER_GROUP="${OS_USER}" # tester
fi
if [ "${OS_USER_PASSWORD}" == "" ]; then
OS_USER_PASSWORD=
fi
if [ "${OS_USER_EMAIL}" == "" ]; then
OS_USER_EMAIL="${OS_USER}@localhost" # tester@localhost
fi
OS_USER_HOME="${USER_HOME}/${OS_USER}" #
OS_USER_BIN="${USER_HOME}/${OS_USER}/bin" #
# SSH User Account
if [ "${SSH_USER}" == "" ]; then
SSH_USER="" # tester
fi
if [ "${SSH_USER_PASSWORD}" == "" ]; then
SSH_USER_PASSWORD=
fi
if [ "${SSH_USER_PEM}" == "" ]; then
SSH_USER_PEM=
fi
# # DB Admin Account
# if [ "${DB_ADMIN}" == "" ]; then
# DB_ADMIN="root" # root
# fi
# if [ "${DB_ADMIN_PASSWORD}" == "" ]; then
# DB_ADMIN_PASSWORD=
# fi
# # DB User Account
# #if [ "${DB_NAME}" == "" ]; then
# # DB_NAME="test_db" # mysqldb | mariadb | postgresdb | test_db
# #fi
# if [ "${DB_USER}" == "" ]; then
# DB_USER="tester" # tester
# fi
# if [ "${DB_USER_PASSWORD}" == "" ]; then
# DB_USER_PASSWORD=
# fi
# # MARIADB User Account
# #if [ "${MARIADB_NAME}" == "" ]; then
# # MARIADB_NAME="test_mariadb" # mysql | mariadb | postgresdb | test_mariadb
# #fi
# if [ "${MARIADB_USER}" == "" ]; then
# MARIADB_USER="${DB_USER}" # tester
# fi
# if [ "${MARIADB_USER_PASSWORD}" == "" ]; then
# MARIADB_USER_PASSWORD=${DB_USER_PASSWORD}
# fi
# # POSTGRES User Account
# #if [ "${POSTGRES_NAME}" == "" ]; then
# # POSTGRES_NAME="test_postgres" # mysqldb | mariadb | postgresdb | test_db
# #fi
# if [ "${POSTGRES_USER}" == "" ]; then
# POSTGRES_USER="${DB_USER}" # tester
# fi
# if [ "${POSTGRES_USER_PASSWORD}" == "" ]; then
# POSTGRES_USER_PASSWORD=${DB_USER_PASSWORD}
# fi
# GitHub Account
if [ "${GITHUB_TEAM}" == "" ]; then
GITHUB_TEAM=
fi
if [ "${GITHUB_USER}" == "" ]; then
GITHUB_USER=tester
fi
if [ "${GITHUB_USER_NAME}" == "" ]; then
GITHUB_USER_NAME=tester
fi
if [ "${GITHUB_USER_PASSWORD}" == "" ]; then
GITHUB_USER_PASSWORD=
fi
if [ "${GITHUB_USER_TOKEN}" == "" ]; then
# https://github.com/settings/tokens
GITHUB_USER_TOKEN=
fi
if [ "${GITHUB_USER_EMAIL}" == "" ]; then
GITHUB_USER_EMAIL=tester@example.com
fi
# # GitLab Account
# if [ "${GITLAB_TEAM}" == "" ]; then
# GITLAB_TEAM=
# fi
# if [ "${GITLAB_USER}" == "" ]; then
# GITLAB_USER=tester
# fi
# if [ "${GITLAB_USER_PASSWORD}" == "" ]; then
# GITLAB_USER_PASSWORD=
# fi
# if [ "${GITLAB_USER_EMAIL}" == "" ]; then
# GITLAB_USER_EMAIL=tester@example.com
# fi
# # BitBucket/Jira/Confluence Account
# if [ "${BITBUCKET_TEAM}" == "" ]; then
# BITBUCKET_TEAM=
# fi
# if [ "${BITBUCKET_USER}" == "" ]; then
# BITBUCKET_USER=tester
# fi
# if [ "${BITBUCKET_USER_PASSWORD}" == "" ]; then
# BITBUCKET_USER_PASSWORD=
# fi
# if [ "${BITBUCKET_USER_EMAIL}" == "" ]; then
# BITBUCKET_USER_EMAIL=tester@example.com
# fi
# Docker
if [ "${DOCKER_USER}" == "" ]; then
DOCKER_USER=tester
fi
if [ "${DOCKER_PASSWORD}" == "" ]; then
DOCKER_PASSWORD=
fi
# # AWS
# if [ "${AWS_ACCESS_KEY_ID}" == "" ]; then
# AWS_ACCESS_KEY_ID="<id>"
# fi
# if [ "${AWS_SECRET_ACCESS_KEY}" == "" ]; then
# AWS_SECRET_ACCESS_KEY="<key>"
# fi
# if [ "${AWS_DEFAULT_REGION}" == "" ]; then
# AWS_DEFAULT_REGION="<region>"
# fi
# # Openstack
# if [ "${}" == "" ]; then
# :
# fi
# if [ "${}" == "" ]; then
# :
# fi
# if [ "${}" == "" ]; then
# :
# fi
# IBS
if [ "${IBS_USERNAME}" == "" ]; then
IBS_USERNAME=tester
# IBS_USERNAME=$(osc config https://api.suse.de user | awk '$0=$NF' | tr -d "'")
fi
if [ "${IBS_PASSWORD}" == "" ]; then
IBS_PASSWORD=
fi
# OBS
if [ "${OBS_USERNAME}" == "" ]; then
OBS_USERNAME=tester
# IBS_USERNAME=$(osc config https://api.opensuse.org user | awk '$0=$NF' | tr -d "'")
fi
if [ "${OBS_USERNAME}" == "" ]; then
OBS_USERNAME=
fi
#******************************************************************************
#set +e # Exit on error Off
#set +x # Trace Off
#echo "End: $(basename "${0}")"
#******************************************************************************