Gilbert,

How do I get auth to post to the mailing list?

To post a message to all the list members, send email to
j...@lists.ubuntu.com.you may need to be a member so sign up here:
https://lists.ubuntu.com/mailman/listinfo/juju and other Ubuntu lists are
at https://lists.ubuntu.com/

Regarding the db2 charm:
Our partners at IBM are working on an update to the IBM DB2 charm at the
moment. So we will see that one improve soon.

Thank you for the feedback. I would like to know if there are specific ways
to better describe the charming development process.


   - Matt Bruzek <matthew.bru...@canonical.com>

On Sat, Mar 5, 2016 at 10:32 AM, Gilbert Standen <gilstan...@hotmail.com>
wrote:

> How do I get auth to post to the mailing list?
>
> Subject: RE: Question - Creating first Charm
> From: juju-ow...@lists.ubuntu.com
> To: gilstan...@hotmail.com
> Date: Sat, 5 Mar 2016 16:31:19 +0000
>
> You are not allowed to post to this mailing list, and your message has
> been automatically rejected.  If you think that your messages are
> being rejected in error, contact the mailing list owner at
> juju-ow...@lists.ubuntu.com.
>
>
>
> --Forwarded Message Attachment--
> From: gilstan...@hotmail.com
> To: j...@lists.ubuntu.com
> Subject: RE: Question - Creating first Charm
> Date: Sat, 5 Mar 2016 10:31:11 -0600
>
> Matt, thanks!  I very much appreciate all the help I can get.
>
> imho the best way to do these proprietary products which have free
> licenses is going to be to launch a webpage as part of the charm deployment
> at which point the user (a) accepts the license agreement and (b) downloads
> the install media.  This is the way oracle-xe will work, and the way that
> ibm-db2 will work, and in fact, the way that any advanced oracle product
> deployments such as oracle enterprise edition products (which can also be
> downloaded free of charge but require accepting export restrictions at a
> webpage).
>
> How do I create a charm which calls a product webpage such as
> oracle.com/downloads/productname and waits for the user to accept the
> export restrictions/license terms, and then downloads the software to the
> openstack deployment location (bare metal or lxc container) ?
>
> The frustration level trying to get a foothold on getting started with
> charming is quite high, from my perspective.  I can't find documentation
> that "feels" meaningful to me.  When I go to use existing charms as
> reverse-engineering guides, that is a pretty high wall too - mysql is way
> beyond me because it's just not realistic for me to learn python as part of
> this - that would be an incredibly long-term undertaking and honestly if I
> was thinking of something that long-term investment, I'd rather spend a
> couple years learning to play the violin (one of my goals).  I need to do
> this stuff in bash or work with a partner who knows python.  That's why I
> was looking at the couchdb charm because it's in bash and looks like a
> realistic entry point.
>
> I do think just from my perspective as someone who really loves and values
> the Ubuntu ecosystem and OS, for a consistent comprehensive capability to
> deploy proprietary db products on Ubuntu such as IBM DB2, Oracle, etc. and
> this is the contribution I would like to try and make.  The IBM DB2 charm
> in the charm store looks to me to be very underused, very out-of-date, and
> byzantine to deploy, and built around an old version (IBM DB2 10.5).  I
> thought the DB2 charm might have been a good template  because it requires
> a "webpage type license exports restrictions acceptance" but even doing a
> "charm get db2" has proven impossible to even examine how that charm is
> built.
>
> I'm afraid there's a very daunting road ahead to get anywhere with this
> for me, but I do want to get oracle onto ubuntu products.  As you know, I
> wrote https://github.com/gstanden/orabuntu-lxc which is kind of loosely
> speaking an LXC replacement for products like VirtualBox and VMWare Player
> for running Oracle Enterprise Edition products on Ubuntu kernels natively
> with no hypervisor, but the charm initiative for me is to move from a
> desktop experience to POC that Oracle Enterprise products can actually be
> run natively on Ubuntu kernels in LXC containers on actual production-ready
> Openstack deployments.  I get incredulous sceptical remarks from people
> about the idea of running Oracle Enterprise production workloads natively
> on Ubuntu kernels using LXC containers, but I see no real obstacles to
> this, and I have a philosophy of building a capability regardless of what
> the viewpoint is on use cases if that capability does not currently exist.
> I know you support these ideas too because you have been very very
> supportive of this work, which I very much appreciate.
>
> Thanks!!
>
> ------------------------------
> From: j...@ubuntu.com
> Date: Sat, 5 Mar 2016 01:03:13 +0000
> Subject: Re: Question - Creating first Charm
> To: matthew.bru...@canonical.com; gilstan...@hotmail.com;
> j...@lists.ubuntu.com
>
>
> Great suggestions, Matt!
>
> Gilbert, just wanted to thank you for working on the charm. Should you
> need any more help, don't hesitate to ask the list.
>
> Hope to see you around!
>
> --
> José Antonio Rey
>
> On Fri, Mar 4, 2016, 19:43 Matt Bruzek <matthew.bru...@canonical.com>
> wrote:
>
> Hello Gilbert,
>
> Thanks for the email. I have added the Juju list so others can chime too.
>
> Because Oracle-XE 11gR2 version requires accepting a license agreement to
> download from Oracle.com...
>
> ​​We are going to introduce a new concept in Juju 2.0 called "terms" where
> you can run an "accept" command for software with proprietary ​software.
> You would put "terms" key in your metadata.yaml. Check the release notes
> for some tips on this feature:
> https://jujucharms.com/docs/devel/temp-release-notes
>
> Alternately you could make a configuration option where the user could
> accept the license on the Oracle page, and put the key in a configuration
> option, where the charm would not install if the key is empty or invalid.​
>
> So my install hook is taking shape kinda like this (and works):​ ...
>
> ​I would really encourage you to look at our new Developer documents (
> https://jujucharms.com/docs/devel/developer-getting-started ) that
> introduce charm layers and a reactive framework. From my experience it is
> much more "natural" to write charms this way where you can define states
> and react to them. As an example you could define: 'oracle.downloaded',
> 'oracle.configured', and 'oracle.available' and the code could react to
> different states.
>
> My question is, what is the best way to automate this last step for charm
> deployment?
>
> ​Non interactive install scripts are the bane of my existence! ​I have a
> number of techniques to work around these, such as piping the "yes" command
> to a script, or redirecting strings into the interactive bits. The best
> approach is on a case to case basis, but you may have to re-write this
> script. I
>
> ...to just use the default values and to use some hardcoded default
> password.
>
> Hard coded passwords are never the right way to go and against Charm Store
> policy ( https://jujucharms.com/docs/devel/authors-charm-policy ).
> Either randomly generate a password that the user can retrieve or have that
> set as a configuration option but remember all configuration options must
> be able to change at any time (mutability). I have used some template
> technologies to put charm configuration options in places where the script
> would prompt users.
>
> So I'm thinking one obvious way would be to just have some sed and awk
> steps to just change the oracle-xe script to just non-interactively use the
> default ports
>
> Make the ports configurable, so that you can deploy the service and know
> the port where it is being served. The user could change it if they know
> that port is being used.
>
> Database charms are the most complex for *me* to understand, but I
> encourage you to look at the "mysql" charm for tips on database. It was
> written by one of our best charmers who knows how to install databases. You
> will find many answers to your questions in that charm.
>
> If you have any further questions please share them with
> j...@lists.ubuntu.com so the whole community has the benefit of the
> information, and other database charmers can pipe in.
>
>    - Matt Bruzek <matthew.bru...@canonical.com>
>
> On Fri, Mar 4, 2016 at 1:36 PM, Gilbert Standen <gilstan...@hotmail.com>
> wrote:
>
> Hey I'm sorry to bug you with another question but I'm trying to find my
> way along to get through creating my first charm.
>
> Because Oracle-XE 11gR2 version requires accepting a license agreement to
> download from Oracle.com (adding a level of complexity to creating my first
> charm) I stepped back even further to Oracle-XE 10gR2 which actually is
> still available from a DEB repository.   I realize 10gR2 is pretty old but
> for purposes of learning how to charm, it's great, because it's available
> from a ppa still and it's pretty easy to deploy from a manual steps
> perspective, so it should be a good "first charm" exercise for me.
>
> So my install hook is taking shape kinda like this (and works):
>
> # GLS start
> echo 'deb http://oss.oracle.com/debian/ unstable main non-free' | sudo
> tee --append /etc/apt/sources.list
> echo 'deb-src http://oss.oracle.com/debian/ unstable main' | sudo tee
> --append /etc/apt/sources.list
> wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add
> -
> apt-get update
> apt-get install -y  oracle-xe --force-yes
> # GLS end
>
> all of the above works great.  However, oracle-xe has a configuration
> script that has to be run at this point (as many db's do) which sets some
> ports and the admin password.  That script comes with it and is
> '/etc/init.d/oracle-xe" and it is run interactively (typically) as shown
> below:
>
> /etc/init.d/oracle-xe configure
>
> which goes like this (interactively):
>
> --- snip start----
>
> root@W520:/etc/init.d# ./oracle-xe configure
>
> Oracle Database 10g Express Edition Configuration
> -------------------------------------------------
> This will configure on-boot properties of Oracle Database 10g Express
> Edition.  The following questions will determine whether the database
> should
> be starting upon system boot, the ports it will use, and the passwords
> that
> will be used for database accounts.  Press <Enter> to accept the defaults.
> Ctrl-C will abort.
>
> Specify the HTTP port that will be used for Oracle Application Express
> [8080]:
>
> Specify a port that will be used for the database listener [1521]:
>
> Specify a password to be used for database accounts.  Note that the same
> password will be used for SYS and SYSTEM.  Oracle recommends the use of
> different passwords for each database account.  This can be done after
> initial configuration:
> Confirm the password:
>
> Do you want Oracle Database 10g Express Edition to be started on boot
> (y/n) [y]:
>
> Starting Oracle Net Listener...Done
> Configuring Database...Done
> Starting Oracle Database 10g Express Edition Instance...Done
> Installation Completed Successfully.
> To access the Database Home Page go to "http://127.0.0.1:8080/apex";
> root@W520:/etc/init.d#
>
> ---snip end---
>
> My question is, what is the best way to automate this last step for charm
> deployment?  One way would be for me to just do some kind of sed or awk and
> replace the interactive steps in the /etc/init.d/oracle-xe script to just
> use the default values and to use some hardcoded default password.
>
> However, the script does some checking to verify that the default ports of
> 8080 and 1521 are not already in use which again would involve some
> interactive steps, which pretty much we don't want in a charm, correct?.
>
> So I guess what I am wondering is what is the best way to handle these
> kind of configuration steps.  I downloaded the couchdb charm, and it has
> steps like this which look like they are doing similar config steps (all
> the stuff starting with DEFAULT_ADMIN_PASSWORD for example:
>
> ---snip start---
>
> apt-get install -y couchdb facter facter-customfacts-plugin uuid
> python-couchdb pwgen
>
> DEFAULT_ADMIN_PASSWORD=`pwgen -N1`
> DEFAULT_REPLICATION_PASSWORD=`pwgen -N1`
>
> fact-add couchdb_hostname `facter fqdn`
> fact-add couchdb_ip `facter ipaddress`
> fact-add couchdb_port 5984
> fact-add couchdb_replication ${DEFAULT_REPLICATION_PASSWORD}
> fact-add couchdb_admin ${DEFAULT_ADMIN_PASSWORD}
>
> sed -i.bak -e "s/bind_address =.*/bind_address = `facter couchdb_ip`/"
> /etc/couchdb/default.ini
> sed -i.bak -e "s/;port =.*/port = `facter couchdb_port`/" \
>            -e "s/;bind_address.*/bind_address = `facter couchdb_ip`/" \
>            -e "s/; require_valid_user = false/require_valid_user = true/" \
>            -e "s/;admin =.*/admin = ${DEFAULT_ADMIN_PASSWORD}/" \
>            /etc/couchdb/local.ini
>
> echo "replication = ${DEFAULT_REPLICATION_PASSWORD}" >>
> /etc/couchdb/local.ini
>
> service couchdb status && service couchdb restart || service couchdb start
>
> open-port `facter couchdb_port`/TCP
>
> ---snip stop---
>
> So I'm thinking one obvious way would be to just have some sed and awk
> steps to just change the oracle-xe script to just non-interactively use the
> default ports, but I'd still have to pass in the default passwords for SYS
> and SYSTEM.
>
> Any pointers to some documentation on different ways to solve this type of
> challenge would be helpful.
>
> Thanks,
>
> Gilbert
>
>
> --
> Juju mailing list
> j...@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to