DB2 installer for dev/test VM#286
Conversation
There was a problem hiding this comment.
I must have been looking at old IBM docs that say 32 and 64bit are required for the installer but after experimenting it seems that only the 64bit libs are needed and that's the package that will actually get installed.
|
@MMatten, what would happen if provisioning is executed twice? |
|
Good spot on the provisioning. I've added a check for an existing instance. On the provisioning - is it better to use Chef than a Vagrant shell provisioner anyway? I don't know the pros and cons of that, and I can't really help with Chef either though. |
I think it's good to keep things relatively uniform. Actually the Oracle recipe is pretty much shell script - it should be straightforward to convert this one in a similar shape. For reference - take a look at |
|
In case there is no DB2 package in dbfit root (means it won't be installed): the script is still installing the related rpm packages. |
There was a problem hiding this comment.
Who will be the owner of this folder in case we create it here?
BTW: the content of dist folder is being purged when running some of the DbFit build tasks (bundle, start*).
I'm not sure we have to deal with deploying the jdbc driver at this stage. Maybe better to leave Gradle to deal with it.
There was a problem hiding this comment.
I was expecting for this to be removed anyway. If you can let Gradle deploy the driver into dist/ then great. Can put a copy of the driver onto your S3 space (I think that's where the Oracle driver is pulled from into the local maven repo) and update the build or would you do using a script? redeploy-odjbc.bat is still present but I guess is dead now as no maven.
|
|
|
I got some errors on the unpacking step. But I was using another box (due to some other experiments and due to download from the official gets stuck for some reason). |
|
@MMatten thanks for doing this work - so with this working within the VM, do the DB2 tests pass? |
|
@benilovj - Jake, yes, they (the non i/z series tests) all pass. |
|
@javornikolov Javor - what happens if you run the tar command in a different directory, like /tmp ? |
Folder is mounted via NFS. Owner is from my host OS (uid/gid are not present in the guest).
I ran Uncompressing to |
|
@javornikolov "--no-same-owner" looks like safe option considering the troubles I've also had with NFS. I guess that's why this might have worked for me (as Windows and so no NFS). I'll update the script to use this. |
I have some doubts though - in theory something may depend on the ownership of files in the archive (if db2 installer doesn't set them explicitly afterwards). |
|
Seems db2 installer is clever enough to handle setup when the archive is untarred with |
|
When rebuilding the machine (while db2jcc4.jar is already in dist/lib) I got the following error: |
|
Ok, I've just pushed to my repo for some rework to do i) use Chef instead of the shell provisioner ii) allow installation via vagrant/chef or by executing the shell script whilst logged in iii) a tear down script to remove the installation (doesn't get run at the moment, may be useful to someone), though this will currently only succeed against a fully successful installation iv) changes to the tar switches v) if installing by running the shell script package installation won't be executed if there's no DB2 installation to perform (I think the Chef version might still do this though). Also, I removed the JDBC driver copy to dist/lib. |
|
The |
There was a problem hiding this comment.
No newline at the end of file here.
There was a problem hiding this comment.
Alignment issue here (mixing spaces and tabs).
There was a problem hiding this comment.
misalignment here too
|
@javornikolov Hi, I can add the missing EOLs on the last line of the shell scripts. As for the file modes - I had checked in from the Windows host. I didn't even know Git kept properties such as mode for files. Do you know a way to recommit these (without making a dummy change, committing, removing it, committing, etc) or modify the file permissions? |
There was a problem hiding this comment.
Do we need to invoke that with DOLIBS when we have them installed here via the chef package?
There was a problem hiding this comment.
The in -d the Chef command means don't do the detection as it's already called in the not_if.
The -l in the Chef command means don't install the library packages as it's done via the recipe.
I wasn't sure either but seems Git keeps the properties - and chmod is seen as change. Maybe you can try to change them from within the VM - It shows up e.g. like that: diff --git a/dbfit-java/db2/src/test/resources/deinstall_db2.sh b/dbfit-java/db2/src/test/resources/deinstall_db2.sh
old mode 100644
new mode 100755 |
|
@javornikolov I chmodded the files and git saw them as a change. For some reason mode changes don't get listed by ls though. I think this is another Win/Linux VB synced folder issue. |
|
@javornikolov I just cloned my fork to a new local repo on the guest and the local files didn't have the x attribute. So I've added from Linux, committed and pushed again. Should be ok now. |
|
Thanks! It looks good now. |
So gave it a try and all the provisioning (including db2) is working great for me 👍 |
|
Great stuff. Thanks! We still wont be able to execute tests until we can get the driver into the build. |
|
LGTM - merging |
DB2 installer for dev/test VM
|
thanks @MMatten! |
|
It's been a pleasure! Always glad to help out with odds and ends. |
Chaps,
For your consideration...
As I want to get a fully functioning test VM for the Teradata updates (in case of core fixes) I've created an installer for DB2 Express-C for the VM. It's much along the lines of the Oracle shell script.
Not knowing much at all about Chef I've added the provisioning it straight to the Vagrantfile.
One known issue if that it doesn't make the JDBC driver available to the build (I copy it to dist/lib in the script but this just gets blitzed by the build) as I can't put stuff onto your S3 area (and know almost nothing about how to configure gradle anyway).
This is my first github pull request so hope I'm not breaking any etiquette!
Cheers,
Mark