• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how do i do a build in linux when i am using a Windows laptop ?

 
Ranch Hand
Posts: 1037
1
  • Number of slices to send:
    Optional 'thank-you' note:
Hi guys,

I am in serious trouble now cos I was required to deploy the rest client in java to a build env which needs to be in linux but I am using a Windows laptop.

How can I go about doing it ?

Furthermore, I got to do a CI-CD with proper action and scripts to compile, containerise and send to a container repo and run in cloud.  Is GitHub Action considered cloud ?

Can the above be accomplished in 3 days ?

Hope someone can advise me.  

Tks.
 
Greenhorn
Posts: 27
1
  • Number of slices to send:
    Optional 'thank-you' note:
For a Linux environment I use Oracle VirtualBox, https://www.virtualbox.org/, download an ISO of Ubuntu and create a virtual machine.
For the cloud part you should be able to use any of the big 3 for free (Azure, AWS, Google Cloud). I used Google Cloud for my project.
Docker is easy to use for containerization.
I used Jenkins for CI-CD.

Hope this helps.
 
tangara goh
Ranch Hand
Posts: 1037
1
  • Number of slices to send:
    Optional 'thank-you' note:
Is there other ways cos my laptop is left with very little memory, even I have already uninstalled Ubuntu and VirtualBox already.
 
Michael Billiot
Greenhorn
Posts: 27
1
  • Number of slices to send:
    Optional 'thank-you' note:
You could spin up Linux VM in your cloud environment and use those. I used Google Compute Engine API, seemed to work ok. Think I have 3 or so VM's running at the time.
 
tangara goh
Ranch Hand
Posts: 1037
1
  • Number of slices to send:
    Optional 'thank-you' note:

Michael Billiot wrote:You could spin up Linux VM in your cloud environment and use those. I used Google Compute Engine API, seemed to work ok. Think I have 3 or so VM's running at the time.



ok. But, I am totally new to what you have suggested and I can only afford free things now as in using the cloud.

Do you have a beginner tutorial for the task I have mentioned ?

Tks alot for your help.
 
Rancher
Posts: 43081
77
  • Number of slices to send:
    Optional 'thank-you' note:
If you're time-constrained, using VirtualBox is probably quicker to do (especially as you know it already) than would be learning a cloud environment.

But build tools like Maven or Gradle are cross-platform, so you might/should be able to use the same build setup on both Windows and Linux. Does the build contain anything you suspect might not work out of the box on Linux?
 
tangara goh
Ranch Hand
Posts: 1037
1
  • Number of slices to send:
    Optional 'thank-you' note:

Ulf Dittmer wrote:If you're time-constrained, using VirtualBox is probably quicker to do (especially as you know it already) than would be learning a cloud environment.

But build tools like Maven or Gradle are cross-platform, so you might/should be able to use the same build setup on both Windows and Linux. Does the build contain anything you suspect might not work out of the box on Linux?



Actually i forgot everything, including even how to write a Linux script Docker image for deployment

I only remember i have to read in the directory that i put my java code but i am not sure even if i should exclude the .class file just when we push it to github ? And then the libraries but then it will contain in Maven already which is part of the java app ?

Totally lost. Advice needed. Tks.

I am thinking of using Docker and then upload to GitHub Action but i do not know about the missing link which is from GitHub action to cloud.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Number of slices to send:
    Optional 'thank-you' note:
I see. I was just commenting on the basic build, which should work on Linux as it does elsewhere. Maybe someone else can help with the Docker stuff.
 
Saloon Keeper
Posts: 27868
196
  • Number of slices to send:
    Optional 'thank-you' note:
Here are the ways to run Linux on a Windows box:

1. Run it in a VM. VirtualBox is good and you can even use Vagrant to create and destroy VMs for a completely clean build each time. However, Microsoft also has its own VM subsystem, even though I haven't used it in so long I forget its name.

2. Set up a Dual Boot system. In such a case, when you boot your laptop, you get a boot menu where you pick which OS you want to run. The OS you select then boots up and completely owns the machine until shutdown, so as long as you have the disk space (about 15BG currently) and don't need both OS's at the same time, that's a popular option.

3. Set up a "Live Boot" system. Many distros allow you to create a USB thumb and/or DVD OS image. Plug it in, make sure your BIOS can boot from it, and go. As with Dual Boot, the Live Boot system owns the machine, and it will typically run slower since external peripherals generally aren't as fast as internal ones, but it's convenient. The Live Boot is also intended for people who want to preview an OS distro and optionally install it to their hard drive.

Having said that, there's very little need to run Linux just to develop Java applications (including webapps) on a Windows machine. For several years, in fact, I ran Windows XP on my desktop for production systems running Linux and Solaris and so did the rest of my department. It's true — when you code properly, Java is, in fact "Write Once/Run Anywhere". The popular IDEs and build tools all are available under both platforms, and a WAR built under Windows can be directly shipped to a Tomcat server running on Linux or even MacOS. Or debuggerd/tested on a Tomcat running under Windows. Just as an example.
 
tangara goh
Ranch Hand
Posts: 1037
1
  • Number of slices to send:
    Optional 'thank-you' note:
I just found that I may not need all these setup. Correct me if I am wrong.  I can actually use a Docker with Linux scripting and then test if it run (so this is the part that I am not sure if it will run in Windows since it is in Linux scripting ) then i do the next step which is to upload to a cloud.
 
Tim Holloway
Saloon Keeper
Posts: 27868
196
  • Number of slices to send:
    Optional 'thank-you' note:
Please don't quote everything I said.  Quotes are for when you need to mention a specific section of something. If we want to read the whole thing we can simply  look up to the original.

Docker is not a VM and if you're not already familiar with Linux, then the extra complexity involved in containerizing probably won't be worth the trouble of learning Docker and how to Dockerize your project. Especially if your cloud isn't going to be running the apps in containers.

As I said, most Java stuff doesn't care much about what OS you are running on, and it's possible that you don't need any sort of viirtualizing or containerizing to do your work. If there are non-Java elements required such as shell scripts, then a VM is probably your best choice, although you might be able to use Cygwin, which is a way of emulating Linux under Windows. Cygwin isn't quite the same thing as true virtualization, but it has served me in the past.
 
Sheriff
Posts: 22787
131
  • Number of slices to send:
    Optional 'thank-you' note:
I'm surprised nobody mentioned WSL yet. It can be installed on Windows Pro and up if I remember correctly. But I do agree with Tim - building just Java code shouldn't require a Linux machine. I've built applications on Windows before and deployed them on Linux.
 
Tim Holloway
Saloon Keeper
Posts: 27868
196
  • Number of slices to send:
    Optional 'thank-you' note:
I didn't mention WSL because it's after my time and I'm not sure what its exact capabilities are. CygWin, after all was sort of the original "WSL" and there are distinct snippets of Cygwin-specific code in the Tomcat scripts. Same reason I didn't specifically mention Azure. Not sure what's locally standard, what's freely installable, what's not free and what simply lives in the cloud or elsewhere.

I am happy, however that NFS is now natively available in Windows 10 and up. I was having a regular nightmare getting Samba past the container/selinux/file access rights/mirror server/maze of recent Windows and Linux distros. Windows NFS has its limits, and apparently one has to kick the Windows box to get the shares to fully come online after power-up, but overall it has made life a lot easier.
 
Rob Spoor
Sheriff
Posts: 22787
131
  • Number of slices to send:
    Optional 'thank-you' note:
As far as I can tell, WSL basically *is* Linux but with a custom kernel or something similar that integrates with Windows itself. Unlike Cygwin or MSYS (which is used by Git Bash), it has a proper Linux file system with user rights and all. You get automatic mounts of your Windows drives inside WSL, and you can access the WSL disk from Windows through network share \\wsl$.

I've been using Docker Desktop for a while, and it works great, except when it comes to permissions on mounted volumes. Assigned permissions don't stick. That's easy, until I have to run the same Docker command on a Linux machine and it starts failing.
I needed to run Jenkins on Docker recently, and on Windows it was so slow I installed Docker inside WSL on the same machine. Speed is a lot better, and I'm working with actual permissions. Before I could just mount a volume and be done with it. Now I actually need to think about permissions (which I think is actually a good thing).

Note: this applies to WSL 2. WSL 1 was a lot different, probably more like Cygwin / MSYS, or otherwise a sort of VM inside Hyper-V. I'm not sure how it worked before.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |