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
be7f7904
Commit
be7f7904
authored
8 years ago
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A script for making box files smaller
parent
57cdd192
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 @
be7f7904
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
mode
:
"
0755"
mode
:
"
0755"
with_items
:
with_items
:
-
{
src
:
'
show-repo-heads.j2'
,
dest
:
'
show-repo-heads'
}
-
{
src
:
'
show-repo-heads.j2'
,
dest
:
'
show-repo-heads'
}
-
{
src
:
'
pre-box.j2'
,
dest
:
'
pre-box'
}
tags
:
tags
:
-
install
-
install
-
install:configuration
-
install:configuration
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/edx_ansible/templates/pre-box.j2
0 → 100644
View file @
be7f7904
#!/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
This diff is collapsed.
Click to expand it.
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