Merge lp://qastaging/~doanac/uci-engine/restish-code-layout into lp://qastaging/uci-engine

Proposed by Andy Doan
Status: Superseded
Proposed branch: lp://qastaging/~doanac/uci-engine/restish-code-layout
Merge into: lp://qastaging/uci-engine
Diff against target: 434 lines (+140/-80)
8 files modified
charms/precise/restish/charm-helpers.yaml (+1/-0)
charms/precise/restish/config.yaml (+0/-10)
charms/precise/restish/hooks/hooks.py (+64/-52)
charms/precise/restish/unit_tests/test_hooks.py (+67/-13)
ci-utils/ci_utils/unit_config.py (+6/-1)
juju-deployer/gatekeeper.yaml.tmpl (+0/-2)
juju-deployer/nf-stats-service.yaml.tmpl (+0/-2)
nf-stats-service/nfss/database.py (+2/-0)
To merge this branch: bzr merge lp://qastaging/~doanac/uci-engine/restish-code-layout
Reviewer Review Type Date Requested Status
Canonical CI Engineering Pending
Review via email: mp+224520@code.qastaging.launchpad.net

Commit message

restish charm: reorganize code layout and improve install logic

This does a couple of things that were hard to do piece by piece. The
change is a bit big but:

The main goal was getting our code to be in its own directory so it
can start to be treated like read-only. We have an idea in the future
of code rollbacks, so this fits in with that model. This now deploys
code to:

 /srv/<service>/code/r<revno>_<sha1>

and we maintain a symlink to the latest code with:

 /srv/<service>/code/current

While doing this I got rid of all the bzr-branch logic we no longer
use. This reduces complexity.

I'll also converted our tarball logic to use charmhelpers.fetch.

While changing so much, I also decided to improve our code-extraction
logic by moving it to our config-changed logic. This means that
we now have the ability to update code by just changing the payload
value of the service.

To post a comment you must log in.
621. By Andy Doan

[r=Evan Dandrea, PS Jenkins bot] Allow ticket-system/lander/webui to coordinate about which lander is processing a ticket. from Andy Doan

622. By Andy Doan

[r=Celso Providelo, PS Jenkins bot] webui charm: fix relationship bugs

While experimenting with multiple units of the lander, I discovered
the way we manage our relationships in this charm are all wrong.
Basically, they were working off relation-id which is unique to a
relationship and won't take into account multiple units within a
relationship. We used the "relation-id" because its available during
a relation-broken function. However, I also learned that the broken
function is the wrong place to handle what we want. We really want
to be called during the "departed" hook. This will still include
the full context of the relationship and will allow us to handle
multiple units.
  from Andy Doan

623. By Francis Ginther

[r=PS Jenkins bot, Andy Doan] Fix path to ci-utils used by bin/create_lp_creds and the url handler logic. from Francis Ginther

624. By Vincent Ladeuil

[r=PS Jenkins bot, Andy Doan] Small doc fixes. from Vincent Ladeuil

625. By Andy Doan

[r=PS Jenkins bot, Francis Ginther] lander: fix live "lander logs"

revno 606 relocated the live logs to lander-logs. I somehow failed
to include this file in that MP. This gets live logging working again. from Andy Doan

626. By Celso Providelo

[r=Ursula Junque, Evan Dandrea, PS Jenkins bot] Fixing the WebUI auto-refresh feature and preventing tempurls from GK to get cached. 1289276,1335120 from Celso Providelo

627. By Andy Doan

[r=PS Jenkins bot, Evan Dandrea] lander charm: make more charm-helper friendly

This makes this more charmhelper friendly and adds some testing. from Andy Doan

628. By Joe Talbott

[r=Andy Doan, PS Jenkins bot] django - Add logging support.

* moves juju_settings and juju_logs into the django project directory.
* change settings.py and url.py injection files to django project directory so
  they are inserted into the proper files rather than created in the top-level
  working directory.
* supports 'django_log_level' option for python-django charm, defaults to 'DEBUG'
* logs to /srv/<project>/<type>-logs/django.log
* fixes gunicorn.log and access.log for webui. from Joe Talbott

Revision history for this message
Celso Providelo (cprov) wrote :

I am fine losing the ability to deploy branches, but others might disagree and ask why a similar re-organisation cannot be done checking branches. I think the VCS support brings more troubles (access permission and slowness) then benefits, but it's worth checking someone's opinion on this.

There are few diff comments for your consideration and I am perfectly happy to approve the branch after they are addressed.

IFAICT, we are missing rewriting gunicorn.conf and restarting the service to have `juju set <unit> payload_url=<new_tarball_in_swift>` and voilá, unit will be running new code, correct ?

629. By Paul Larson

[r=Celso Providelo, PS Jenkins bot] Don't create extra swift container in imagebuilder from Paul Larson

Revision history for this message
Andy Doan (doanac) wrote :

I think i responded to your comments and fixed the one issue (rev 619) I think you are right about. Let me know.

630. By Andy Doan

[r=PS Jenkins bot, Celso Providelo] deploy.py: make juju-deployer "stack" configurable

This allows us to mix in new juju-deployer files like "experimenatal" from Andy Doan

631. By Vincent Ladeuil

[r=PS Jenkins bot, Evan Dandrea] Detect juju type provider to better support lxc testing env. from Vincent Ladeuil

632. By Paul Larson

[r=Andy Doan, PS Jenkins bot] Don't fail the upgrade on unknown services from Paul Larson

633. By Andy Doan

[r=PS Jenkins bot, Celso Providelo] amqpworker: add ability to provide json status

This adds a simple in-process webserver to report json status. It
then uses the hook to give all rabbit workers this support.

Each worker can override the "engine_health" method to provide
any custom checks they desire.
  from Andy Doan

634. By Ursula Junque

[r=Celso Providelo] Blocks user from submitting packages targetted to unsupported series; it also checks if all packages target the same series before creating the ticket. from Ursula Junque

635. By Andy Doan

[r=Celso Providelo, PS Jenkins bot] rabbit worker charm: convert to charmhelpers

This gets the rabbit worker charm using charmhelpers everywhere its
applicable.

One great benefit: I discovered the root of a bug we'd been seeing
forever where our worker started but failed to connect to rabbit. The
issue was that the first "config-changed" call wasn't including the
rabbit password. ie - the relation wasn't completely ready. This new
code detects that situation and prevents us from starting up until
the password is ready. from Andy Doan

636. By Thomi Richards

[r=Francis Ginther, PS Jenkins bot, Andy Doan] Initial import of non functional stats service app. from Canonical CI Engineering

637. By Vincent Ladeuil

[r=Evan Dandrea] Introduce glance credentials so we can split between swift access and nova/glance access. 1335753 from Vincent Ladeuil

638. By Paul Larson

[r=Vincent Ladeuil, PS Jenkins bot] Add syslog to the artifacts the testrunner picks up. from Paul Larson

639. By Para Siva

[r=PS Jenkins bot, Evan Dandrea, Francis Ginther] Some cli related doc changes for rtd. from Parameswaran Sivatharman

640. By Andy Doan

[r=PS Jenkins bot, Francis Ginther] remove lander-archiver

This hasn't been needed for a couple of months and I somehow forgot
to delete it.
  from Andy Doan

641. By Andy Doan

[r=Francis Ginther, PS Jenkins bot]
ppa-cleaner: make it match permissions of gunicorn daemon

We need to match the gunicorn user/group so that we'll be able
to write to the logs directory
 1336842 from Andy Doan

642. By Robert Bruce Park

[r=Thomi Richards, PS Jenkins bot] Optimize away a call to eval(). from Robert Bruce Park

643. By Celso Providelo

[r=PS Jenkins bot, Andy Doan] Adding an integration test for probing credential capabilities for IBS. from Celso Providelo

644. By Robert Bruce Park

[r=Thomi Richards, PS Jenkins bot] Explain how to write graph definitions in the README. from Robert Bruce Park

645. By Paul Larson

[r=Andy Doan, PS Jenkins bot] Add environment checks at deploy time for the new GLANCE_* variables from Paul Larson

646. By Ursula Junque

[r=Francis Ginther, PS Jenkins bot] Display better errors in case requests fail during ticket creation 1337294 from Ursula Junque

647. By Evan

[r=Andy Doan, PS Jenkins bot] Document using squid to cache apt downloads in the juju local provider. from Evan Dandrea

648. By Vincent Ladeuil

[r=PS Jenkins bot, Evan Dandrea] Add a --no-skip option to error out if some tests are skipped. 1338467 from Vincent Ladeuil

649. By Ursula Junque

[r=PS Jenkins bot, Celso Providelo] Initial fix for bug 1337877. It adds /run/lock to the image chroot, mounting it properly. 1337877 from Ursula Junque

650. By Thomi Richards

[r=Paul Larson, PS Jenkins bot] Added the sphinx.ext.autodoc extension. from Thomi Richards

651. By Thomi Richards

[r=Paul Larson, Robert Bruce Park, PS Jenkins bot] Add the NFSS documentation to the main uci engine documentation. from Thomi Richards

652. By Robert Bruce Park

[r=Robert Bruce Park, Thomi Richards, PS Jenkins bot] Migrate assets to assets.ubuntu.com. from Robert Bruce Park

653. By Robert Bruce Park

[r=Paul Larson, PS Jenkins bot] Allow graph definitions to be cached now that development has stabilized. from Robert Bruce Park

654. By Andy Doan

[r=PS Jenkins bot, Celso Providelo] gatekeeper: add a tempurl status check

This adds a health check to prove tempurls work.

Since tempurl creation can take a little time, I added a simple
caching mechanism to hold a response for up to 60s. from Andy Doan

655. By Evan

[r=PS Jenkins bot, Vincent Ladeuil] Provide tarmac.py, which tarmac will use to drive both the unit and integration tests. from Evan Dandrea

656. By Evan

[r=PS Jenkins bot, Vincent Ladeuil] Get the path correct for testing.venv in called-by-tarmac. Fix a pep8 issue. from Evan Dandrea

657. By Andy Doan

[r=Paul Larson, PS Jenkins bot] bsbuilder: fix TODO for unit_config from Andy Doan

658. By Andy Doan

[r=PS Jenkins bot, Francis Ginther, Celso Providelo] lander charm: reorganize code layout and improve install logic

This does a couple of things that were hard to do piece by piece. The
change is a bit big but:

The main goal was getting our code to be in its own directory so it
can start to be treated like read-only. We have an idea in the future
of code rollbacks, so this fits in with that model. This now deploys
code to:

 /srv/<service>/code/r<revno>_<sha1>

 and we maintain a symlink to the latest code with:

  /srv/<service>/code/current

While doing this I got rid of all the bzr-branch logic we no longer
use. This reduces complexity.

I'll also converted our tarball logic to use charmhelpers.fetch.

While changing so much, I also decided to improve our code-extraction
logic by moving it to our config-changed logic. This means that
we now have the ability to update code by just changing the payload
value of the service.

659. By Andy Doan

unit-config: allow discovery with new code layout

The new code layout will be like:

 /srv/<service>/
                 unit_config
        /code/current/<code>

660. By Andy Doan

restish charm: reorganize code layout and improve install logic

This does a couple of things that were hard to do piece by piece. The
change is a bit big but:

The main goal was getting our code to be in its own directory so it
can start to be treated like read-only. We have an idea in the future
of code rollbacks, so this fits in with that model. This now deploys
code to:

 /srv/<service>/code/r<revno>_<sha1>

 and we maintain a symlink to the latest code with:

  /srv/<service>/code/current

While doing this I got rid of all the bzr-branch logic we no longer
use. This reduces complexity.

I'll also converted our tarball logic to use charmhelpers.fetch.

While changing so much, I also decided to improve our code-extraction
logic by moving it to our config-changed logic. This means that
we now have the ability to update code by just changing the payload
value of the service.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches