Project

General

Profile

Support #3274

create a "reference VM" for a FWD developer system, based on Ubuntu

Added by Greg Shah about 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

Screenshot at 2017-06-16 01_09_03.png (117 KB) Hynek Cihlar, 06/15/2017 07:11 PM

History

#1 Updated by Greg Shah about 7 years ago

The virtual machine should have a disk size large enough to reasonably work on a wide range of projects (500GB or 1TB). It should be created as a sparse disk so that the actual size is minimized.

I would prefer if /boot/, /home/, /var/, /opt/ are all on the same / root partition. The idea is to avoid some of the common "out of disk" issues that can occur during Ubuntu software updates.

I have made some recent changes to how the std workstation pulls updates and to the ncurses patching to use the hooks in apt-get instead of cron. I need to get those to you.

My thinking here is that we should have something very close to our standard workstation (without the GCD-specific parts). I think it should also have a nicely setup Eclipse environment so that people can download the VM, run it and start FWD development/testing/debugging immediately.

It is probably best to provide a script to download and install the latest FWD revision rather than have it be included in the VM. Otherwise we have to refresh the VM every time we release. I'm open to other approaches or ideas too.

#2 Updated by Greg Shah about 7 years ago

To the degree that the installation is scripted, please document the usage of the scripts in https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation.

#3 Updated by Constantin Asofiei about 7 years ago

  • Status changed from New to Review
Greg, I have some questions/requests:
  1. See https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation#Download-Required-Files - where should I upload these files (I want to keep them together, not on redmine) - is ~/shared/dev_tools/vm/setup/ OK? And after that can you upload them to https://proj.goldencode.com/downloads/vm/setup/?
  2. Please remove all the attachments from the https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation page, I don't have rights to delete them.
  3. I have a init-fwd.sh script which has links hard-coded like this:
    fwd_url="https://proj.goldencode.com/downloads/fwd/v3_0_0_trunk_rev_11146/fwd_v3_0_0_trunk_rev_11146_20170402.zip" 
    hotel_chui_url="https://proj.goldencode.com/attachments/download/5833/hotel_chui_demo_application_rev_45_fwd_3_0_0_p2j_trunk_11146_20170404.zip" 
    hotel_gui_url="https://proj.goldencode.com/downloads/hotel_gui/hotel_gui_demo_application_rev_125_fwd_3_0_0_p2j_trunk_11146_20170404.zip" 
    

    Ideally, I would want to have the links like:
    https://proj.goldencode.com/downloads/fwd/fwd_latest.zip
    https://proj.goldencode.com/downloads/hotel_gui/hotel_gui_latest.zip
    https://proj.goldencode.com/downloads/hotel_chui/hotel_chui_latest.zip
    

    where the archives are just sym-links to the latest release. Can this be done?
    Also, I think the Hotel ChUI archives should be moved to https://proj.goldencode.com/downloads/hotel_chui, too.
  4. Where should I upload the fwd-dev.vdi file? The Ubuntu Desktop 16.04 VM is configured with a 1TB sparse disk, with a 4GB swap partition and everything else on a single partition.

#4 Updated by Greg Shah about 7 years ago

is ~/shared/dev_tools/vm/setup/ OK? And after that can you upload them to https://proj.goldencode.com/downloads/vm/setup/?

Yes, this makes sense.

Please remove all the attachments from the https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation page, I don't have rights to delete them.

Done.

where the archives are just sym-links to the latest release. Can this be done?

Agreed. This should be possible. Hopefully the existing Apache cfg will handle it, but if not I can make it work.

Where should I upload the fwd-dev.vdi file? The Ubuntu Desktop 16.04 VM is configured with a 1TB sparse disk, with a 4GB swap partition and everything else on a single partition.

Put it in some temp dir on devsrv01 for now.

#5 Updated by Constantin Asofiei about 7 years ago

Greg Shah wrote:

is ~/shared/dev_tools/vm/setup/ OK? And after that can you upload them to https://proj.goldencode.com/downloads/vm/setup/?

Yes, this makes sense.

OK, all files are there.

where the archives are just sym-links to the latest release. Can this be done?

Agreed. This should be possible. Hopefully the existing Apache cfg will handle it, but if not I can make it work.

OK, the scripts use the "latest" links as described in my note.

Where should I upload the fwd-dev.vdi file? The Ubuntu Desktop 16.04 VM is configured with a 1TB sparse disk, with a 4GB swap partition and everything else on a single partition.

Put it in some temp dir on devsrv01 for now.

Is uploading to devsrv01:/tmp/vm/fwd-dev.vdi.zip, file size is 2012083185 bytes, will take a while...

#6 Updated by Greg Shah about 7 years ago

And after that can you upload them to https://proj.goldencode.com/downloads/vm/setup/?

Done.

Ideally, I would want to have the links like:

https://proj.goldencode.com/downloads/fwd/fwd_latest.zip
https://proj.goldencode.com/downloads/hotel_gui/hotel_gui_latest.zip
https://proj.goldencode.com/downloads/hotel_chui/hotel_chui_latest.zip

where the archives are just sym-links to the latest release. Can this be done?

Done.

Also, I think the Hotel ChUI archives should be moved to https://proj.goldencode.com/downloads/hotel_chui, too.

Done. I changed the wiki document (https://proj.goldencode.com/projects/p2j/wiki/Hotel_ChUI_Demo_Application) to use the new download versions.

#7 Updated by Constantin Asofiei about 7 years ago

Constantin Asofiei wrote:

Is uploading to devsrv01:/tmp/vm/fwd-dev.vdi.zip, file size is 2012083185 bytes, will take a while...

The VM disk is on devsrv01:/tmp/vm/fwd-dev.vdi.zip

#8 Updated by Greg Shah about 7 years ago

Hynek: Would you please test the VM image that Constantin has prepared. It can be found at devsrv01:/tmp/vm/fwd-dev.vdi.zip and some documentation is here:

https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation#Pre-Configured-VM

Please keep track of everything you do to setup and use the VM productively. Edit the wiki page to add those details to make this as easy as possible for our users.

Constantin: I'm thinking that it would be better to have a script that would run when the VM first starts which would download the latest FWD and ChUI/GUI Hotel projects. Otherwise we have to refresh the VM with every code release...

#9 Updated by Constantin Asofiei about 7 years ago

Greg Shah wrote:

Constantin: I'm thinking that it would be better to have a script that would run when the VM first starts which would download the latest FWD and ChUI/GUI Hotel projects. Otherwise we have to refresh the VM with every code release...

~/setup/init-fwd.sh already does this for FWD + Hotel apps. We can make this more clear in the documentation, to use this script to ensure the latest version is there?

Otherwise, if we want to automate this, I would do it in a way that it does this only once: otherwise, deleting the existing ~/projects/p2j folder might delete more than intended (i.e. custom changes?).

#10 Updated by Hynek Cihlar about 7 years ago

Greg Shah wrote:

Hynek: Would you please test the VM image that Constantin has prepared. It can be found at devsrv01:/tmp/vm/fwd-dev.vdi.zip and some documentation is here:

https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation#Pre-Configured-VM

Please keep track of everything you do to setup and use the VM productively. Edit the wiki page to add those details to make this as easy as possible for our users.

Just to confirm, does it include all the steps needed to download and get the virtualization software (VirtualBox), configure a virtual machine and run?

#11 Updated by Greg Shah about 7 years ago

Just to confirm, does it include all the steps needed to download and get the virtualization software (VirtualBox), configure a virtual machine and run?

We can assume someone will get VirtualBox (or KVM) going separately. It would be useful to include some good links to be helpful, but we don't need to document that part.

The configuration of the VM is different. I do think we should include instructions on that.

#12 Updated by Hynek Cihlar about 7 years ago

Greg Shah wrote:

The configuration of the VM is different. I do think we should include instructions on that.

What virtualization platforms and host OSes do you want me to test?

#13 Updated by Greg Shah about 7 years ago

What virtualization platforms and host OSes do you want me to test?

VirtualBox on Ubuntu and Windows is sufficient.

I plan to test KVM at some point (and will provide instructions to convert the disk image into the right format). In KVM, I can export the VM definition as an XML file which I can post.

#14 Updated by Greg Shah about 7 years ago

We can make this more clear in the documentation, to use this script to ensure the latest version is there?

Yes, this makes sense.

#15 Updated by Hynek Cihlar about 7 years ago

Constantin, I downloaded the disk image from devsrv01:/tmp/vm/fwd-dev.vdi.zip, successfully ran it, but I didn't find the eclipse, neither /home/fwd/projects dir. Am I missing something?

#16 Updated by Constantin Asofiei about 7 years ago

Hynek Cihlar wrote:

Constantin, I downloaded the disk image from devsrv01:/tmp/vm/fwd-dev.vdi.zip, successfully ran it, but I didn't find the eclipse, neither /home/fwd/projects dir. Am I missing something?

Hmm... I think the .vdi is corrupted for some reason. I'll check again and get back to you.

#17 Updated by Hynek Cihlar about 7 years ago

Constantin Asofiei wrote:

Hynek Cihlar wrote:

Constantin, I downloaded the disk image from devsrv01:/tmp/vm/fwd-dev.vdi.zip, successfully ran it, but I didn't find the eclipse, neither /home/fwd/projects dir. Am I missing something?

Hmm... I think the .vdi is corrupted for some reason. I'll check again and get back to you.

Constantin, any progress? May I somehow help?

#18 Updated by Constantin Asofiei about 7 years ago

Hynek Cihlar wrote:

Constantin Asofiei wrote:

Hynek Cihlar wrote:

Constantin, I downloaded the disk image from devsrv01:/tmp/vm/fwd-dev.vdi.zip, successfully ran it, but I didn't find the eclipse, neither /home/fwd/projects dir. Am I missing something?

Hmm... I think the .vdi is corrupted for some reason. I'll check again and get back to you.

Constantin, any progress? May I somehow help?

In the end it was because I was using snapshots, and had to clone to create the final vdi file. I'm uploading it now, to devsrv01:/tmp/vm/fwd-dev2.vdi.zip, but the speed is ~100KB/s, and will take a while, as the archive is ~8GB. I tried to shrink it, but no luck.

#19 Updated by Hynek Cihlar about 7 years ago

I tested the image on Linux/VirtualBox. It runs OK, the Eclipse environment builds and runs the predefined launch configs fine, all the sample projects run OK, the conversions run OK, too.

Just some minor issues and thoughts:
  • There is a system error when the Virtual OS starts (see the attached screen shot).
  • The Eclipse icon pinned to the task bar doesn't have the Eclipse image set, it only shows a question mark image.
  • The Eclipse P2J client launch configurations run Widget browser together with the converted application. I think we should not show it by default as this may confuse the user.
  • Do we want to use FWD instead of the obsolete P2J for non-identifiers (like Eclipse project name, name of the Eclipse launch configurations, etc.)?

Tomorrow I will test Windows/VirtualBox and update the wiki page with VirtualBox config instructions.

#20 Updated by Hynek Cihlar about 7 years ago

I tested the image on Windows/VirtualBox and didn't find any new issues. I added the setup instructions to wiki, please see https://proj.goldencode.com/projects/p2j/wiki/Scripted_Installation#section-3.

#21 Updated by Greg Shah about 7 years ago

  • There is a system error when the Virtual OS starts (see the attached screen shot).
  • The Eclipse icon pinned to the task bar doesn't have the Eclipse image set, it only shows a question mark image.
  • The Eclipse P2J client launch configurations run Widget browser together with the converted application. I think we should not show it by default as this may confuse the user.
  • Do we want to use FWD instead of the obsolete P2J for non-identifiers (like Eclipse project name, name of the Eclipse launch configurations, etc.)?

Please go ahead and resolve all of these. I think the ideas make sense.

#22 Updated by Hynek Cihlar about 7 years ago

Greg Shah wrote:

  • There is a system error when the Virtual OS starts (see the attached screen shot).
  • The Eclipse icon pinned to the task bar doesn't have the Eclipse image set, it only shows a question mark image.
  • The Eclipse P2J client launch configurations run Widget browser together with the converted application. I think we should not show it by default as this may confuse the user.
  • Do we want to use FWD instead of the obsolete P2J for non-identifiers (like Eclipse project name, name of the Eclipse launch configurations, etc.)?

Please go ahead and resolve all of these. I think the ideas make sense.

Ok, will do.

#23 Updated by Greg Shah about 7 years ago

I like the wiki changes. I have split the document into two pieces:

https://proj.goldencode.com/projects/p2j/wiki/Pre-Built_Virtual_Machines
https://proj.goldencode.com/projects/p2j/wiki/Automating_Installation

These have been linked into the RICA as chapters. I also made some text updates to clarify some things.

#24 Updated by Hynek Cihlar about 7 years ago

Constantin, there is a missing Eclipse launch configuration "P2J Test Client Batch" referenced by "P2J Test Batch". If you have the configuration handy, can you please post it here so that I can include it in the image?

#25 Updated by Hynek Cihlar about 7 years ago

I resolved all the points from note 22 and uploaded the resulting image to devsrv01:/tmp/vm/fwd-dev3.zip. Note that note 24 is not resolved yet.

#26 Updated by Greg Shah about 7 years ago

I will wait until tomorrow evening before I move the final VM disk image to the downloads section and link to it. If note 24 can be resolved in time, let's include it.

Constantin: Do you have the "P2J Test Client Batch" launch configuration?

#27 Updated by Constantin Asofiei about 7 years ago

Greg Shah wrote:

I will wait until tomorrow evening before I move the final VM disk image to the downloads section and link to it. If note 24 can be resolved in time, let's include it.

Constantin: Do you have the "P2J Test Client Batch" launch configuration?

AFAIK batch clients can't be started from Eclipse, as they require a real terminal environment (same as ncurses clients). We can remove this from the launch configs.

Hynek: these launch configs were adapted from the ~/shared/dev_tools/eclipse/launches configurations; there you have both ncurses and batch client launch configs, but I never was able to make them work directly from Eclipse. Is it possible.

#28 Updated by Hynek Cihlar about 7 years ago

I am uploading a new image with the batch Eclipse launch configuration removed.

#29 Updated by Hynek Cihlar about 7 years ago

Hynek Cihlar wrote:

I am uploading a new image with the batch Eclipse launch configuration removed.

The upload has finished, the image is in /tmp/vm/fwd-dev3.vdi.zip.

#31 Updated by Hynek Cihlar about 7 years ago

I have updated https://proj.goldencode.com/projects/p2j/wiki/Pre-Built_Virtual_Machines to reflect the image changes. Also I simplified the memory size instruction in the Setup section.

#32 Updated by Greg Shah about 7 years ago

Well done guys, the final test will be some customers that will try it today.

#33 Updated by Greg Shah over 3 years ago

  • Status changed from Review to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF