Charm review for Openbook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charms Collection |
Fix Released
|
Undecided
|
Michael Garza |
Bug Description
Review charm for recommendation by charmers group.
Related branches
- Charles Butler (community): Approve
- Andrew McLeod (community): Approve
- José Antonio Rey (community): Needs Fixing
- Review Queue (community): Approve (automated testing)
-
Diff: 242 lines (+114/-77)2 files modifiedapiREADME.md (+100/-73)
metadata.yaml (+14/-4)
Review Queue (review-queue) wrote : Automated Test Results: Charm review for Openbook | #1 |
Michael Garza (miqe) wrote : | #2 |
The automated Azure test was unable to ssh to the juju box and is not an issue with the charm.
Jorge Castro (jorge) wrote : | #3 |
We had some guys looking at reviewing this and did an initial first pass, sorry for the lack of response, I've asked them to post asap.
Kevin W Monroe (kwmonroe) wrote : | #4 |
Hi Michael - first up, thanks for the submission! I look forward to seeing Openbook in the Charm Store!
You're right that the Azure failure doesn't seem indicative of a charm problem -- probably just a network hiccup. That said, I don't see any tests included in your charm. For Trusty and beyond, tests are required per the Charm Store Policy [1]. Everything else LGTM, but we'll need to add some tests to get this to "recommended" status in the store (which is where we want you to be).
So you've got a couple options. I created a basic test and linked it as a related branch to this bug if you'd like to take a look:
http://
It deploys openbook/
Of course you're welcome to expand this and/or create your own tests (you know better than I what a successful Openbook install looks like). If you decide to create tests from scratch, I suggest taking a look at charm-tools [2] if you haven't already. You can run "charm add tests" in your charm dir and get a helpful chunk of boilerplate created for you in a ./tests subdir. This auto-generated stuff uses the amulet harness [3] and is what I used in my branch.
The easiest way to test your tests is to use bundletester [4]. That's what we use during our automated testing and it's pretty easy. WARNING: it will clobber your current Juju environment and redeploy units according to your tests, so only do this in an environment that you don't need to preserve. Once you pip install it, here's how you'd run it from your charm dir (the -v and -l DEBUG just give you more output):
$ bundletester -v -l DEBUG # did you read my WARNING above? read my WARNING above if you're gonna use this.
Regardless of how you choose to do your tests, thanks again for the submission. It's a really well-documented charm and I think would make a great addition to the Charm Store. Let us know if you have any questions/concerns, and whenever you drop tests in, we'll be happy to do a re-review.
Thanks!
Refs:
[1] https:/
[2] https:/
[3] https:/
[4] https:/
Michael Garza (miqe) wrote : Re: [Bug 1411402] Charm review for Openbook | #5 |
Hello Kevin,
Sorry for the long delay. I appreciate you taking the time to write up the sample test. I went ahead and merged the changes into our branch. When time permits we will look into adding more thorough tests.
Thanks again.
> On Jan 23, 2015, at 12:40 AM, Kevin W Monroe <email address hidden> wrote:
>
> Hi Michael - first up, thanks for the submission! I look forward to
> seeing Openbook in the Charm Store!
>
> You're right that the Azure failure doesn't seem indicative of a charm
> problem -- probably just a network hiccup. That said, I don't see any
> tests included in your charm. For Trusty and beyond, tests are required
> per the Charm Store Policy [1]. Everything else LGTM, but we'll need to
> add some tests to get this to "recommended" status in the store (which
> is where we want you to be).
>
> So you've got a couple options. I created a basic test and linked it as
> a related branch to this bug if you'd like to take a look:
>
> http://
>
> It deploys openbook/
> openbook url is accessible. If this looks ok to you, feel free to merge
> it into your branch and tweak as you see fit.
>
> Of course you're welcome to expand this and/or create your own tests
> (you know better than I what a successful Openbook install looks like).
> If you decide to create tests from scratch, I suggest taking a look at
> charm-tools [2] if you haven't already. You can run "charm add tests"
> in your charm dir and get a helpful chunk of boilerplate created for you
> in a ./tests subdir. This auto-generated stuff uses the amulet harness
> [3] and is what I used in my branch.
>
> The easiest way to test your tests is to use bundletester [4]. That's
> what we use during our automated testing and it's pretty easy. WARNING:
> it will clobber your current Juju environment and redeploy units
> according to your tests, so only do this in an environment that you
> don't need to preserve. Once you pip install it, here's how you'd run
> it from your charm dir (the -v and -l DEBUG just give you more output):
>
> $ bundletester -v -l DEBUG # did you read my WARNING above? read my
> WARNING above if you're gonna use this.
>
> Regardless of how you choose to do your tests, thanks again for the
> submission. It's a really well-documented charm and I think would make
> a great addition to the Charm Store. Let us know if you have any
> questions/concerns, and whenever you drop tests in, we'll be happy to do
> a re-review.
>
> Thanks!
>
> Refs:
> [1] https:/
> [2] https:/
> [3] https:/
> [4] https:/
>
> ** Branch linked: lp:~kwmonroe/charms/trusty/openbook/1411402
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm review for Openbook
>
> Status in Juju Charms:
> New
>
> Bug description:
> Review charm for recommendation by charmers group.
>
...
Matt Bruzek (mbruzek) wrote : | #6 |
# Charm Review Talligent
Thank you for the submission of the Openbook charm! I am excited to see another Java web application using the tomcat charm.
I took a look at the charm and there were a few things that need to be fixed before the openbook charm is ready for the recommended section of the charm store.
## charm proof
When I ran charm-proof it raised an informational message.
I: Categories are being deprecated in favor of tags. Please rename the "categories" field to "tags".
According to this page: https:/
I would recommend editing metadata.yaml and changing “categories” to “tags” with the value of monitoring. This tags field can also be multiple values if you feel others fit as well.
## README.md
The readme markdown renders to HTML well! There is a minor spacing issue with the juju commands. With a blank line between paragraphs, only four spaces is needed to make the juju commands a formatted block.
Being new to Talligent I didn't know much about Openbook, and used the readme as my guide. The readme is the opportunity to describe to a new user the product and how to use it. The readme included instructions on how to deploy Openbook, but I could not find any information on where to go to use the Openbook product. Since this is a web application that kind of information should be included in the readme. Here is an example:
“After the openbook charm is deployed and related you can go to the Openbook web page at: http://
I was not clear to me what the Administrator or Customer login ids were to log into the web site, so I stopped here. Some more information in the readme would be very helpful to customers using Openbook.
## config.yaml
You have 2 configuration options in here that look good.
## copyright
The copyright file in the charm is for the charm code only, and is not for the Talligent Openbook code. The charm store policy is to have an open source license for the charm code. https:/
Please select an open source license and use that in the charm.
## hooks/install
This code looks great! It is well written and easy to read, making use of our best practices.
## hooks/config-
I spotted a problem in this hook related to the way you are handling the openbook.properties file. The config-changed hook is called anytime a configuration option changes (for example after a deploy). The properties file is extracted each time, edited and put back in the charm at /usr/share/
So when I changed the license-key value (juju set openbook license-
Changed in charms: | |
status: | New → In Progress |
assignee: | nobody → Michael Garza (miqe) |
Michael Garza (miqe) wrote : | #7 |
## charm proof
I ran charm-proof as well but the latest version on Mac OS X is 1.3.3 (homebrew) which complains of the opposite. I changed it and ran the tool on an Ubuntu box with no errors.
## README.md
Changed to 4 spaces.
I added the small paragraph that you wrote and also referred the user to the getting started guide. This will help them setup the software after the application is running.
## copyright
Changed to a open source license.
## hooks/config-
This hook will now clean up the directories also and only deploy the war if it had already been previously deployed.
## hooks/db-
Same thing here, before starting Tomcat clean up and redeploy war.
## tests
Although the test is simple, it is a good test because the application will not start if the properties are incorrectly set.
Changed in charms: | |
status: | In Progress → Fix Committed |
Matt Bruzek (mbruzek) wrote : | #8 |
Hi Mike,
Thank you for the fast turn around on this code. I tried the latest branch and I got an error in the config-changed hook when I tried to change the application-
Here is the tail of the /var/log/
2015-02-05 22:56:31 INFO unit.openbook/
2015-02-05 22:56:31 INFO unit.openbook/
2015-02-05 22:56:31 INFO unit.openbook/
2015-02-05 22:56:31 INFO unit.openbook/
2015-02-05 22:56:31 INFO unit.openbook/
2015-02-05 22:56:31 INFO juju.worker.
2015-02-05 22:56:31 ERROR juju.worker.uniter uniter.go:608 hook "config-changed" failed: exit status 127
Looking at the config-changed code, it looks like you are using a '$' in front of the DEPLOY variable when you are trying to set it false, remove that and the set would be successful.
Changed in charms: | |
status: | Fix Committed → In Progress |
Michael Garza (miqe) wrote : | #9 |
Hello Matt,
Im sorry for the silly mistake. Ive updated the code.
Thanks.
> On Feb 5, 2015, at 5:08 PM, Matt Bruzek <email address hidden> wrote:
>
> Hi Mike,
>
> Thank you for the fast turn around on this code. I tried the latest
> branch and I got an error in the config-changed hook when I tried to
> change the application-
>
> Here is the tail of the /var/log/
>
> 2015-02-05 22:56:31 INFO unit.openbook/
> 2015-02-05 22:56:31 INFO unit.openbook/
> 2015-02-05 22:56:31 INFO unit.openbook/
> 2015-02-05 22:56:31 INFO unit.openbook/
> 2015-02-05 22:56:31 INFO unit.openbook/
> 2015-02-05 22:56:31 INFO juju.worker.
> 2015-02-05 22:56:31 ERROR juju.worker.uniter uniter.go:608 hook "config-changed" failed: exit status 127
>
> Looking at the config-changed code, it looks like you are using a '$' in
> front of the DEPLOY variable when you are trying to set it false, remove
> that and the set would be successful.
>
>
> ** Changed in: charms
> Status: Fix Committed => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm review for Openbook
>
> Status in Juju Charms:
> In Progress
>
> Bug description:
> Review charm for recommendation by charmers group.
>
> To manage notifications about this bug go to:
> https:/
Changed in charms: | |
status: | In Progress → Fix Committed |
Matt Bruzek (mbruzek) wrote : | #10 |
#Review
Michael,
Thank you for the quick turn around. The new code fixes the config-changed problem with the last review.
I deployed this charm today and tried changing both of the configuration options. The `license-key` option seems to be working. However changing the `application-
juju set openbook application-
I then tried to go to http://
Looking at the code, the config-changed hook changes the `APPLICATION_
As the charm author you can define the configuration values that are important to your users. If the context root is not something that users will normally change you can remove that configuration option. If you think that is a useful option then the code should handle moving the code to a different context root.
Please let me know if you have any questions. Thanks again for sticking with the review process. Let me know when you are ready for another review.
Michael Garza (miqe) wrote : | #11 |
Hello Matt,
We decided to remove the context root option out of the charm configuration as it would normally never be changed. The changes have been pushed and is ready for review whenever you are.
Thank you for your feedback it is greatly appreciated!
> On Feb 10, 2015, at 4:47 PM, Matt Bruzek <email address hidden> wrote:
>
> #Review
>
> Michael,
>
> Thank you for the quick turn around. The new code fixes the config-
> changed problem with the last review.
>
> I deployed this charm today and tried changing both of the configuration
> options. The `license-key` option seems to be working. However
> changing the `application-
> where the webapp is actually hosted. I ran the following command:
>
> juju set openbook application-
>
> I then tried to go to http://
> The webapp was still found at the original url: http://
>
> Looking at the code, the config-changed hook changes the
> `APPLICATION_
> never relocates the war file or the directory to the new directory (in
> this example the webapp should have been in
> /var/lib/
>
> As the charm author you can define the configuration values that are
> important to your users. If the context root is not something that
> users will normally change you can remove that configuration option. If
> you think that is a useful option then the code should handle moving the
> code to a different context root.
>
> Please let me know if you have any questions. Thanks again for sticking
> with the review process. Let me know when you are ready for another
> review.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm review for Openbook
>
> Status in Juju Charms:
> Fix Committed
>
> Bug description:
> Review charm for recommendation by charmers group.
>
> To manage notifications about this bug go to:
> https:/
Matt Bruzek (mbruzek) wrote : | #12 |
Dear Mike,
I took another look at the latest charm code that you gave me. It looks great and I pushed it to the recommended section of our charm store! Congratulations! Thank you for working with us in the review process.
Anyone can now deploy openbook charm with the following command:
juju deploy openbook
(Of course they will need to deploy the supporting services, I just wanted to point out the new namespace.)
The charm is available on the web site at:
https:/
The bug tracker for the openbook charm is here:
https:/
Thanks again for submitting this code for the charm
Changed in charms: | |
status: | Fix Committed → Fix Released |
This items has failed automated testing! Results available here http:// reports. vapour. ws/charm- tests/charm- bundle- test-10947- results