Teamspeak charm needed

Bug #894825 reported by Bruno Pereira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Fix Released
Undecided
Unassigned

Bug Description

https://code.launchpad.net/~brunopereira81/+junk/teamspeak

Under development, needs some fixes already implemented on next rev push.

Tags: new-charm
Jorge Castro (jorge)
Changed in charm:
status: New → Triaged
Revision history for this message
Bruno Pereira (brunopereira81) wrote :
Revision history for this message
Bruno Pereira (brunopereira81) wrote :
Jorge Castro (jorge)
tags: added: new-charm
Revision history for this message
Mark Mims (mark-mims) wrote :

Review:

Looks great overall... just a couple of minor fixes before it goes into the charm store.

Things to fix:

- we need to cryptographically verify the payload of your wget. There're many ways to do this.. the easiest is if the upstream provider publishes hashes of their downloads... we just check the download against those published hashes. If upstream doesn't hash their downloads, you can just hash the payload yourself and compare that hash explicitly from the charm. Drawback is that when the payload changes versions, the hash will change and we'll have to update the charm and charm version accordingly.

- please push to lp:~brunopereira81/charm/oneiric/teamspeak3/trunk so the charm'll be picked up by the charm store browser.

- please go ahead and remove unimplemented relations from the metadata.yaml file... you can safely delete everything after the description.

Things to discuss and/or recommendations:

- Does it make sense to enhance the functionality of the /etc/init.d/teamspeak3 startup script to include functions like 'restart' or 'generate_database' instead of working those explicitly into the config-changed hook? Dunno... what you have looks like it works fine, just thinking about organization of responsibilities.

Testing spin-up now...

Thanks!
Mark

Revision history for this message
Mark Mims (mark-mims) wrote :

Ok, a few more things to fix:

- doesn't spin up into a working state.
teamspeak's running, but it's not bound to any ports.
Not sure what's going on here, but I'm happy to help debug... catch me on IRC (m_3, freenode#juju, US Mountain Time).

Things to discuss and/or recommendations:

- install and config-changed hooks don't actually use all of the parameters in config.yaml. Not sure if this is b/c it's not finished yet or if it's just cruft left behind.

Revision history for this message
Bruno Pereira (brunopereira81) wrote :
Revision history for this message
Mark Mims (mark-mims) wrote :

Adding a note to capture what we found:

startup failed b/c binary teamspeak payload is architecture-dependent... need to check arch and download the appropriate version of teamspeak. I'll add this as a feature-request on charm-tools too.

Revision history for this message
Bruno Pereira (brunopereira81) wrote :

Added architecture detect and download option for 32/64bits;
Added md5sum check to the downloaded files;
Un implemented relations removed;
Added 'restart', 'init_db' to teamspeak3 init scrip and fixed config change hook

config.yaml remains the same, want to explore the extra possibilities of having more config changed without accessing the server with the client. Besides run juju get teamspeak3 and you get the default configuration ;)

Pushed latest changes right now.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi bruno. I was looking through recent commits and I saw that you added md5 hashing.

Rather than have everybody implement this over and over, we've created a set of tools called charm-helpers, and it has a method, 'file_get', which verifies an md5sum.

The docs are basically non-existant, so bear with us. But you can see an example of it is used here:

https://code.launchpad.net/~marcoceppi/charm/oneiric/phpmyadmin/trunk

Revision history for this message
Bruno Pereira (brunopereira81) wrote :

Its implemented on the latest rev of the install hook, pushing it now.

Revision history for this message
Bruno Pereira (brunopereira81) wrote :

done, tested.

Revision history for this message
Mark Mims (mark-mims) wrote :

I'm still having trouble getting this to come up...
From EC2, it started an instance where `uname -m` reports i686
Here's the charm.log: http://paste.ubuntu.com/755104/

It's in a 'started' state, but the teamspeak server is not running (it's not even there in /opt).

Revision history for this message
Mark Mims (mark-mims) wrote :

I think we're almost there... this smells like a little issue. I'll debug this further tomorrow.
Thanks Bruno!

Revision history for this message
Bruno Pereira (brunopereira81) wrote :

I know where the bug is, pushed a fix just now but cannot test it at the moment.

2011-11-30 16:24:09,641: hook.output@ERROR: teamspeak3-server_linux-x86-3.0.1.tar.gz: Cannot open
2011-11-30 16:24:09,641: hook.output@ERROR: : No such file or directory

The downloaded file goes to /tmp instead of current directory while using charm_tools :S

Either give it another run or wait till I get to my desktop at home, regardless that I will leave a comment when the dam thing installs and runs on both 32 and 64 bits.

(/me gets ready for next charm on list ;))

Thanks for all the effort, regards.

Revision history for this message
Mark Mims (mark-mims) wrote :

Woohoo!

I've subsequently made a license change to address clint's comment that the license needs an explicit copyright holder,
so please pull from the lp:charm/teamspeak3 master branch before making any further changes.

Thanks

Changed in charm:
status: Triaged → Fix Released
Revision history for this message
Bruno Pereira (brunopereira81) wrote :

yey, it got published! :D

thx guys, will pull from the master branch for later changes/fixes to it and moving on to ftp-server then, regards!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.