Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
terraform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
HADOOP
terraform
Commits
904fa118
Commit
904fa118
authored
4 years ago
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Hadoop: better to use master-less mode for puppet in single machine setup
parent
29442275
No related branches found
No related tags found
No related merge requests found
Pipeline
#617
canceled
4 years ago
Stage: test
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
image/scripts/hadoop-single-setup.sh
+2
-9
2 additions, 9 deletions
image/scripts/hadoop-single-setup.sh
with
2 additions
and
9 deletions
image/scripts/hadoop-single-setup.sh
+
2
−
9
View file @
904fa118
...
@@ -12,22 +12,15 @@ fi
...
@@ -12,22 +12,15 @@ fi
mkdir
/data 2>/dev/null
||
:
mkdir
/data 2>/dev/null
||
:
apt-get
install
-y
puppet-master
hostname
-f
>
/etc/puppet/autosign.conf
systemctl
enable
puppet-master
service puppet-master restart
puppet config
set
server
`
hostname
-f
`
puppet config
set
--section
agent http_read_timeout 30
f
=
/etc/puppet/code/environments/production/manifests/site.pp
f
=
/etc/puppet/code/environments/production/manifests/site.pp
while
grep
-q
'@SECRET@'
$f
;
do
while
grep
-q
'@SECRET@'
$f
;
do
k
=
"
`
dd
if
=
/dev/random
bs
=
27
count
=
1 2>/dev/null |
base64
-
`
"
k
=
"
`
dd
if
=
/dev/random
bs
=
27
count
=
1 2>/dev/null |
base64
-
`
"
sed
-i
"0,/@SECRET@/s,@SECRET,
$k
,"
$f
sed
-i
"0,/@SECRET@/s,@SECRET,
$k
,"
$f
done
done
puppet a
gent
--test
2>&1 |
tee
stage1.log
puppet a
pply
--test
$f
2>&1 |
tee
stage1.log
if
test
$?
=
0
-o
$?
=
2
;
then
if
test
$?
=
0
-o
$?
=
2
;
then
sed
-i
"s/^
\\
(
\$
hdfs_deployed
\\
s*=
\\
s*
\\
).*/
\\
1true/"
$f
sed
-i
"s/^
\\
(
\$
hdfs_deployed
\\
s*=
\\
s*
\\
).*/
\\
1true/"
$f
puppet a
gent
--test
2>&1 |
tee
stage2.log
puppet a
pply
--test
$f
2>&1 |
tee
stage2.log
else
else
echo
"First stage setup failed"
echo
"First stage setup failed"
exit
$?
exit
$?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment