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
OpenEdx
configuration
Commits
304d6ead
Commit
304d6ead
authored
Jan 24, 2017
by
stu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp add stop-automatic-updates to packer scripts
parent
e2d3ad7f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
+43
-0
util/packer/jenkins_worker.json
+5
-0
util/packer/jenkins_worker_android.json
+5
-0
util/packer/jenkins_worker_simple.json
+5
-0
util/packer/jenkins_worker_sitespeedio.json
+5
-0
util/packer/stop-automatic-updates.sh
+23
-0
No files found.
util/packer/jenkins_worker.json
View file @
304d6ead
...
...
@@ -31,12 +31,17 @@
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"stop-automatic-updates.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
},
{
"type"
:
"file"
,
"source"
:
"../../util/install/ansible-bootstrap.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
},
{
"type"
:
"shell"
,
"inline"
:
[
"cd {{user `playbook_remote_dir`}}"
,
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'"
,
"sudo bash ./stop-automatic-updates.sh"
,
"sudo bash ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
...
...
util/packer/jenkins_worker_android.json
View file @
304d6ead
...
...
@@ -30,12 +30,17 @@
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"stop-automatic-updates.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
},
{
"type"
:
"file"
,
"source"
:
"../../util/install/ansible-bootstrap.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
},
{
"type"
:
"shell"
,
"inline"
:
[
"cd {{user `playbook_remote_dir`}}"
,
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'"
,
"sudo bash ./stop-automatic-updates.sh"
,
"sudo bash ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
...
...
util/packer/jenkins_worker_simple.json
View file @
304d6ead
...
...
@@ -31,12 +31,17 @@
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"stop-automatic-updates.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
},
{
"type"
:
"file"
,
"source"
:
"../../util/install/ansible-bootstrap.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
},
{
"type"
:
"shell"
,
"inline"
:
[
"cd {{user `playbook_remote_dir`}}"
,
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'"
,
"sudo bash ./stop-automatic-updates.sh"
,
"sudo bash ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
...
...
util/packer/jenkins_worker_sitespeedio.json
View file @
304d6ead
...
...
@@ -30,12 +30,17 @@
"mkdir {{user `playbook_remote_dir`}}"
]
},
{
"type"
:
"file"
,
"source"
:
"stop-automatic-updates.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/stop-automatic-updates.sh"
},
{
"type"
:
"file"
,
"source"
:
"../../util/install/ansible-bootstrap.sh"
,
"destination"
:
"{{user `playbook_remote_dir`}}/ansible-bootstrap.sh"
},
{
"type"
:
"shell"
,
"inline"
:
[
"cd {{user `playbook_remote_dir`}}"
,
"export CONFIGURATION_VERSION='{{user `remote_branch`}}'"
,
"sudo bash ./stop-automatic-updates.sh"
,
"sudo bash ./ansible-bootstrap.sh"
]
},
{
"type"
:
"ansible-local"
,
...
...
util/packer/stop-automatic-updates.sh
0 → 100644
View file @
304d6ead
#!/usr/bin/env bash
# Kill the apt services holding a dpkg lock, so that the ansible-bootstrap
# script can run without conflicts.
# NOTE: this is a temporary fix. Instead, we should be doing what devops does,
# and first run the security+common roles on a vanilla AMI, which will disable
# unattended-updates and set up users. Then we can feel free to run the
# ansible bootstrap without any problems.
set
-xe
if
grep
-q
'Xenial Xerus'
/etc/os-release
;
then
systemctl stop apt-daily.service
systemctl
kill
--kill-who
=
all apt-daily.service
# Our jenkins job for building AMIs will timeout, even if the lock is
# never released.
while
lsof |grep
-q
/var/lib/dpkg/lock
;
do
echo
"Waiting for apt to release the dpkg lock..."
sleep 5
done
fi
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