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
9402b4ab
Commit
9402b4ab
authored
Sep 12, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A script for making box files smaller
(cherry picked from commit
be7f7904
)
parent
36bbf4c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
playbooks/roles/edx_ansible/tasks/deploy.yml
+1
-0
playbooks/roles/edx_ansible/templates/pre-box.j2
+21
-0
No files found.
playbooks/roles/edx_ansible/tasks/deploy.yml
View file @
9402b4ab
...
...
@@ -32,6 +32,7 @@
with_items
:
-
{
src
:
'
update.j2'
,
dest
:
'
update'
}
-
{
src
:
'
show-repo-heads.j2'
,
dest
:
'
show-repo-heads'
}
-
{
src
:
'
pre-box.j2'
,
dest
:
'
pre-box'
}
tags
:
-
install
-
install:configuration
...
...
playbooks/roles/edx_ansible/templates/pre-box.j2
0 → 100644
View file @
9402b4ab
#!/usr/bin/env bash
#
# Remove needless noise from file systems before packaging a Vagrant box file.
# This can reduce the size of the box file by 25%.
# Run this with sudo in the guest OS just before "vagrant package" in the host.
set
-x
# Discard packages we don't need.
apt-get clean
-y
apt-get autoclean
-y
# Clean out pip caches.
find /
-type
d
-path
'*/.cache/pip'
-print
-exec
rm
-rf
'{}/*'
\;
# Remove all the .pyc files.
find /edx/app
-name
'*.pyc'
-delete
# Last thing: fill the disk with zeros so they'll compress well.
dd
if
=
/dev/zero
of
=
/empty
bs
=
1M
rm
-f
/empty
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