Code review comment for lp://staging/~gary/juju-gui/bug1218924

Revision history for this message
Gary Poster (gary) wrote :

Reviewers: mp+190780_code.launchpad.net,

Message:
Please take a look.

Description:
Change distfile to exclude unnecessary bits

In order to address the charm deployment problems reported today, this
is a first step of two that significantly shrinks the size of our
releases. It takes our release down from about 43M to 9M; that brings
our charm from about 45M to 11M. I'll make another step (switch from gz
to xz) that can bring us down another couple of M. Hopefully that will
be sufficient for the problem.

The code is pretty easy to review, but the qa is a bit more tedious.
First, please make a distfile (BRANCH_IS_GOOD=1 make distfile) and then
follow the instructions I added to the release instructions to test the
resulting tarball. Second, add the tarball to a local copy of the charm
in the releases directory, remove the 0.10.1 tarball, juju bootstrap,
and run make deploy in the charm. Once the charm is deployed, you
should be able to see qa the site.

https://code.launchpad.net/~gary/juju-gui/bug1218924/+merge/190780

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/14516054/

Affected files (+32, -5 lines):
   M Makefile
   A [revision details]
   M docs/process.rst

Index: Makefile
=== modified file 'Makefile'
--- Makefile 2013-09-04 10:48:56 +0000
+++ Makefile 2013-10-12 01:30:26 +0000
@@ -551,6 +551,8 @@
   mkdir -p releases
   # When creating the tarball, ensure all symbolic links are followed.
   tar -c --auto-compress --exclude-vcs --exclude releases \
+ --exclude node_modules --exclude virtualenv --exclude app \
+ --exclude bin --exclude archives --exclude build-shared \
       --dereference --transform "s|^|$(RELEASE_NAME)/|" -f $(RELEASE_FILE) *
   @echo "Release was created in $(RELEASE_FILE)."
  else

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: docs/process.rst
=== modified file 'docs/process.rst'
--- docs/process.rst 2013-10-11 11:04:36 +0000
+++ docs/process.rst 2013-10-12 01:53:31 +0000
@@ -166,12 +166,35 @@
  - Ensure that the ``build-prod/juju-ui/version.js`` file contains a version
    string that combines the value in the branch's ``CHANGES.yaml`` with the
    branch's revno.
-- Start the ``improv.py`` script as described in the HACKING file.
  - While still in the directory where you extracted the tar file, change
- app/config-prod.js to specify apiBackend: 'python'.
-- While still in the directory where you extracted the tar file, run the
- command: ``NO_BZR=1 make prod``.
-- Go to the URL shown in the terminal.
+ build-prod/juju-ui/assets/config.js to specify sandbox: true,
+ defaultViewmode: 'fullscreen', user: 'admin', password: 'admin',
+ simulateEvents: false, isJujucharms: true, and showGetJujuButton: true.
+- Configure a webserver to serve the files, if you have not already. For
+ example, these are nginx instructions.
+
+ - ``sudo apt-get install nginx``
+ - Create a jujugui file in /etc/nginx/sites-available with content
similar to
+ the following, but replacing the root with the path to the build-prod
+ directory of where you have expanded the tarball::
+
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server ipv6only=on;
+ root /home/gary/tmp/juju-gui/build-prod;
+ index index.html;
+ server_name localhost;
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+ }
+
+ - In /etc/nginx/sites-enabled, remove any existing symlinks (such as to
+ "default") and add a symlink to /etc/nginx/sites-avilable/jujugui.
+ - ``sudo service nginx restart`` (or ``sudo service nginx start``).
+
+- Go to the localhost port on which the app is running (80 if you use the
+ instructions above).
  - In Chrome and Firefox, QA the application.

    - Load the app, open the charm panel, go to an inner page, and make

« Back to merge proposal