neontribe / Linked_Development

Linked Development
1 stars 1 forks source link

Cannot deploy server image via tklbam-backup #52

Closed practicalparticipation closed 11 years ago

practicalparticipation commented 11 years ago

I've tried to push a Virtual Server build up to Turnkey's cloud:

(a) using the Turnkey Backup Manager;

(b) launching a vanilla 'core' server and then patching it from GitHub;

But neither seems to create a functioning server with Virtuoso and Apache (even after some reboots etc.)

When patching as per approach (b) I can see the Virtuoso binaries etc. but trying to use them gives me a 'file not found' error.

If this turns out to be really complex to deal with - we may want to review the turnkey build approach, and I can look to deploy elsewhere to another provider which isn't as tied to the Turnkey approach.

ghost commented 11 years ago

I have been investigating this most of the day - it was working Wednesday last week, I am trying to determine if it's an update on github that broke it, or the build tools updating again.

ghost commented 11 years ago

I can build an old version perfectly on a build machine that breaks with this version. It looks like we have done something that breaks the iso generation. I will continue investigating further, but it's our patch rather than the build tools that have broken this by the looks of things.

ghost commented 11 years ago

The tklpatch should now build working iso images again now - it was two missing empty folders that were part of the lodspeakr - have now added two lines to post-overlay that creates the two missing directories.

I will probably need to confirm with Neil that this is not doing something silly when he returns - but if you could test creating/deploying a system from the iso generation and let me know if the sparql stuff is working or if you hit the same problem as the one that made you generate this ticket?

practicalparticipation commented 11 years ago

I've just tried to apply to a code ISO and get

"Errors were encountered while processing: x11-common libice6 libsm6 libxtst6 libpulse0 openjdk-6-jre libaccess-bridge-java libaccess-bridge-java-jni E: Sub-process /usr/bin/dpkg returned an error code (1) Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'"

I've also attempted to apply to a running machine, but that failed on reboot.

ghost commented 11 years ago

Which ISO image are you trying to build the patch against? I have built another ISO today and so has Toby and both of us got an ISO image out of it.

On my build machine I do the following (the build machine is just a standard turnkey 12 i386 install with the tklpatch package installed):

git clone https://github.com/neontribe/Linked_Development.git tklpatch turnkey-core-12.0-squeeze-x86.iso Linked_Development/Linked_Development

(snip)

generating turnkey-core-12.0-squeeze-x86-patched.iso Size of boot image is 4 sectors -> No emulation 2.96% done, estimate finish Tue Jun 4 11:53:49 2013 5.92% done, estimate finish Tue Jun 4 11:53:32 2013 8.88% done, estimate finish Tue Jun 4 11:53:38 2013 11.84% done, estimate finish Tue Jun 4 11:53:41 2013 14.79% done, estimate finish Tue Jun 4 11:53:36 2013 17.76% done, estimate finish Tue Jun 4 11:53:32 2013 20.71% done, estimate finish Tue Jun 4 11:53:35 2013 23.67% done, estimate finish Tue Jun 4 11:53:32 2013 26.62% done, estimate finish Tue Jun 4 11:53:38 2013 29.59% done, estimate finish Tue Jun 4 11:53:36 2013 32.54% done, estimate finish Tue Jun 4 11:53:37 2013 35.50% done, estimate finish Tue Jun 4 11:53:38 2013 38.46% done, estimate finish Tue Jun 4 11:53:36 2013 41.42% done, estimate finish Tue Jun 4 11:53:40 2013 44.37% done, estimate finish Tue Jun 4 11:53:43 2013 47.33% done, estimate finish Tue Jun 4 11:53:41 2013 50.29% done, estimate finish Tue Jun 4 11:53:41 2013 53.25% done, estimate finish Tue Jun 4 11:53:42 2013 56.20% done, estimate finish Tue Jun 4 11:53:40 2013 59.17% done, estimate finish Tue Jun 4 11:53:44 2013 62.12% done, estimate finish Tue Jun 4 11:53:43 2013 65.08% done, estimate finish Tue Jun 4 11:53:45 2013 68.03% done, estimate finish Tue Jun 4 11:53:43 2013 71.00% done, estimate finish Tue Jun 4 11:53:42 2013 73.95% done, estimate finish Tue Jun 4 11:53:43 2013 76.91% done, estimate finish Tue Jun 4 11:53:44 2013 79.87% done, estimate finish Tue Jun 4 11:53:43 2013 82.83% done, estimate finish Tue Jun 4 11:53:42 2013 85.78% done, estimate finish Tue Jun 4 11:53:41 2013 88.74% done, estimate finish Tue Jun 4 11:53:40 2013 91.70% done, estimate finish Tue Jun 4 11:53:41 2013 94.66% done, estimate finish Tue Jun 4 11:53:40 2013 97.62% done, estimate finish Tue Jun 4 11:53:39 2013 Total translation table size: 2048 Total rockridge attributes bytes: 1816 Total directory bytes: 4096 Path table size(bytes): 40 Max brk space used 0 169041 extents written (330 MB) root@core ~# ls Linked_Development
turnkey-core-12.0-squeeze-x86.iso turnkey-core-12.0-squeeze-x86-patched.iso

The eldis import does not work yet - but the R4D should work fine if you boot from the generated turnkey-core-12.0-squeeze-x86-patched.iso.

practicalparticipation commented 11 years ago

Ok. I've tracked down some of the issues I've been facing.

(1) The Virtuoso build is 32bit, so when I'd been trying to patch a 64-bit running turnkey server it was failing.

(2) A lot of set-up is done on first boot - so again patching a running turnkey server makes this fail.

(3) The tklbam-backup system really only works on core images out of the box - and if we want it to work on a patched image so that it fully restores a system then we've got a bit more work to do on that. I had hoped I could deploy into the Turnkey Hub via this mechanism - but as I can't I'm having to use work-arounds to (1) and (2) to get a running server in EC2 using Turnkey Hub.

Below is the process I've used to patch a running core server.


#Start up a 32Bit Turnkey Core image

apt-get install tklpatch

git clone https://github.com/neontribe/Linked_Development.git

tklpatch-apply / Linked_Development/Linked_Development

#Patching a running Turnkey Image

for SCRIPT in /usr/lib/inithooks/firstboot.d/*
    do
        if [ -f $SCRIPT -a -x $SCRIPT ]
        then
            $SCRIPT
        fi
    done

# Then I ran
cd /var/www/htdocs  
rm -rf lodspeakr
bash < <(curl -sL http://lodspeakr.org/install)
chown www-data lodspeakr/meta lodspeakr/cache lodspeakr/settings.inc.php lodspeakr/components

#Then run the Setup Virtuoso again to set the password again
python /usr/lib/inithooks/bin/setup_virtuoso.py

#Then run update_linked_data script to enable sync of the different datasets
update_linked_data