Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
48ded72e
Commit
48ded72e
authored
Feb 01, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put the password generator into a real .sh file
Use my-passwords.yml in sandbox.sh
parent
0df26e09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
util/install/generate-passwords.sh
+18
-0
util/install/sandbox.sh
+5
-0
No files found.
util/install/generate-passwords.sh
0 → 100755
View file @
48ded72e
#!/usr/bin/env bash
#
# Read a list of Ansible variables that should have generated values, and make
# a new file just like it, with the generated values.
TARGET
=
${
OPENEDX_RELEASE
-master
}
wget
-q
"https://raw.githubusercontent.com/edx/configuration/
$TARGET
/playbooks/sample_vars/passwords.yml"
-O
passwords-template.yml
while
IFS
=
read
-r
line
;
do
# Make a random string. SECRET_KEY's should be longer.
length
=
35
if
[[
$line
==
*
SECRET_KEY
*
]]
;
then
length
=
100
fi
REPLACE
=
$(
LC_ALL
=
C < /dev/urandom tr
-dc
'A-Za-z0-9'
| head
-c
$length
)
# Change "!!null"-to-end-of-line to the password.
echo
"
$line
"
| sed
"s/
\!\!
null.*/
\'
$REPLACE
\'
/"
done
< passwords-template.yml
>
my-passwords.yml
util/install/sandbox.sh
View file @
48ded72e
...
...
@@ -66,6 +66,11 @@ for var in ${VERSION_VARS[@]}; do
fi
done
# my-passwords.yml is the file made by generate-passwords.sh.
if
[[
-f
my-passwords.yml
]]
;
then
EXTRA_VARS
=
"-e@
$(
pwd
)
/my-passwords.yml
$EXTRA_VARS
"
fi
CONFIGURATION_VERSION
=
${
CONFIGURATION_VERSION
-
${
OPENEDX_RELEASE
-master
}}
##
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment