Eclipse dev in host or guest os - eclipse

Hi iam new to ambari/vagrant development , want to contribute towards the same . Iam using vagrant to set up my dev environment . Iam using cent os 6.4 as described here
https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development
But iam bit confused as in where will i intall my eclipse and compile the source code in host machine or in vm . If it is in vm , then how can i see the gui to do development . Since i modified the vagrant file to include the following line of code .
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 3072] # RAM allocated to each VM
end
But when i reload the vm and enter the credentials as vagrant/vagrant , i only see the terminal . How can i see a proper gui of the VM ?

The VM that is produced by vagrant isn't intended to develop code on using Eclipse. It's used to test your code or to build from source. This is detailed in the quick start guide. Here are two excerpts from that document stating the same.
Using a vm to build Ambari from source:
Simply edit Vagrantfile to launch a VM with all the tools necessary to build Ambari from source.
The benefit of doing this would be that you could easily provision this VM and build ambari without a lot of overhead.
Using a vm to test Ambari:
This document shows how to quickly set up a cluster using Ambari on your local machine using virtual machines.
The benefit of doing this is you have an isolated environment in which you can test the software you're developing.
The vagrant files that Ambari provides use minimal installs of centos (ie. they dont have GUI software (X) pre-installed.). In order to launch eclipse on those vms you would need to install GUI software or use x-forwarding and ssh to open a view on your host OS. But that would be incredibly slow and not conducive to a good development environment.
If you want to develop using eclipse then you should install it on your host OS along with the other development tools that Ambari requires. There are instructions on how to do that in the link you posted in your original question.

Related

Visual Studio Code remote access to a WSL2:ubuntu on my desktop from my macbook

've looked around and can't seem to find the answer to this - probably because the feature is pretty new.
I tried the remote WSL:ubuntu connection on my windows desktop machine to connect to my WSL2 Ubuntu running on the same machine. This is pretty much perfect as it allows access to my Nvidia GPU under linux
Is there anyway I can do the same trick from my macbook? I can connect to the windows side of the desktop using the new remote tunnel feature but I'm drawing a blank on how to do for the WSL buried in that machine. It looks like it's just using the same remote connection feature so I'm thinking it should be possible but WSL2 network is not exposed the same way you can with a VM or other machine.
The desktop has way more everything than my macbook including a nvidia GPU I want to use for some machine learning.
I can do it from the desktop itself - but it's nice to be able to use that machine from my macbook at certain times of day.
I have recently started using VSCode so I'm on the learning curve with it - it may well be that it's not possible using the new remote tunnels - or requires some messing with adding a new hyper-v bridged adapter to the WSL installation. I'm hoping against hope there's an easy solve that I've somehow missed.
I tried setting up the remote tunnel as per https://code.visualstudio.com/blogs/2022/12/07/remote-even-better but it seems to setup a server to access windows not the WSL2 service.
Thanks for any help!
I had a similar problem and found this github issue. While the developers are looking into including this feature, you currently will need to install the VSCode CLI directly in WSL. You can find the downloads here
Notes
I would recommend the x64 CLI download in the Linux section. It will download a tar.gz file which will have a file named code in it when extracted.
The tunnel will launch from wherever you place that code file, so I put mine in the ~/ (home) directory.
You can then open a tunnel using the command ./code tunnel from that location. You can replace the . with the path to the code file to open the tunnel while in a different directory, i.e. ~/code.
You can still launch a tunnel from Windows with code tunnel. (note that this command does not have ./)

Visual Studio Code on Windows server 2008

Can I install Visual Studio Code on Windows server 2008 ?
I am a developer but I sent the information to my administrators and they told me that the setup file crashes after launched
I get seput file from hee https://code.visualstudio.com/download
procesor: Intel(R) Xeon(R) Gold 6142 CPU # 2.60Ghz - 2.59 GHz
RAM: 8 GB
64-bit
virtual machine
1 CPU - 2 cores
Windows Server 2008
First time answering here so bare with my vintage reply formatting. (also pardon that i couldn't capture screen due to server is on a intranet that not accessible on this device causing a long reply)
Being a unfortunate fellow that need to work on legacy Systems and Application frequently, i happen to have a fresh 2008R2 server recently setup by my team's Server Admin with following specs:
processor: Intel(R) Xeon(R) Gold 5220 CPU # 2.20Ghz - 2.19 GHz ,
OS: Windows Server 2008R2 x64 ,
RAM: 8GB
The versions that is able to install was 1.70.3,which is the same version that is the last supporting versions for Windows 7 as well,if you happen to need to work on devices using that OS version.
although i'm uncertain whether it is a VM or not, i'd like to point out a few more things that your question did not cover but need to consider:
The installer version (System setup vs User Setup)
aside from the x64 |x86 | ARM installer differences, as you've not mentioned which versions of the build and which exact setup installer you sent to your admin, i've first replied which build version successfully installed on 2008R2, which as of writing the latest build was 1.73.0 and on run,it pop up a error message as follow regardless of System/User Setup:
This Program does not support the version of windows your computer is running.
in our current case that we want specific previous versions installer, VScode FAQ on previous versions have a URL lists that enables you to download a specific build version of your preferred setup. For my case (and also refer below to exactly why this one), i've go for System setup, and i know the aprox. supporting version was ~1.70.0, so i used the link as below and replace the {version} to start:
https://update.code.visualstudio.com/{version}/win32-x64/stable
Active Domain, Multiple user sessions etc.
Per VSCode requirements page stated,
VS Code does not support multiple simultaneous users using the software on the same machine, including shared virtual desktop
infrastructure machines or a pooled Windows/Linux Virtual Desktop host
pool.
as im not sure do you work solo or do have fellow colleagues to code on the server at the same time, you might need to reconsider to install using user or System setup.
if your intentions are to use exclusively on a specific AD account, then user setup should probably be good enough.
however, if the intentions was to setup say a shared Remote desktop connections on the VM that allows multiple RDC sessions simultaneously for coding,programming etc., so you intend to install a system setup to allow all users on said server to be able to use VScode, then you might run into the problem the VScode requirements stated it does not support.
in addition, as i was remote connected as administrator , when using a 1.70.2 user setup ,a different warning message as follow was thrown:
This user Installer is not meant to be run as Administrator. If you would like to install VS Code for all users in this system, download the system Installer instead.Are you sure you want to continue?
as the installer itself also checks with the operator on this matter, your admin may have skipped on the exact reasons why the install failed and just told you the installer crashed.
if you absolutely need VScode to run on the server but can't install for reasons, the last resort (aside from going for alternatives like notepad++) is to Setup a Portable Mode builds on your own workstation/devices first, then upload the package to the server and use it from there.
i wouldn't go into too much detail in that as this reply already span for a starwars trilogy length but keep in mind, version limitations still apply, and whatever add-ons you need, you need to download them first before bundle it into the package to upload and run on your server.
Anyone that is a System admin or infrastructure architects , do correct me on my novice understanding on Server settings etc. as although i'm primarily a programmer, i did end up touching a lot more things that i'm not specialized into over the few years of vendor career work so there bound to be incorrect/inaccurate concepts i spilled. cheers.

Best workflow for to work with Ionic2 and Angular2

I'm usually developing PHP backend apps. I'm developing on Windows and use Vagrant to create virtual machine.
Workflow looks like that:
On base machine I have all my project files and I'm using git.
On base machine I have installed PhpStorm which is connected over ssh to virtual machine. PhpStorm is syncing files from base machine to local machine (in one direction)* using deployment.
Every library and module like nodejs, ruby, gulp etc. I'm installing on virtual machine to not clutter my base machine.
Debugging works fine - I can connect PhpStorm debugging over remote ssh.
Almost everything it's fine with that workflow (sometimes I have to download some generated files on virtual machine), but that workflow is not the best for working with Ionic2 and Angular.
Ionic uses many nodejs modules -> this causing many problems in PhpStorm to hinting errors and code completion. Second problem is debuging I can't connect typescript debugging from PhpStorm because all files all generated by gulp on virtual machine.
My question is:
What's is the best workflow when I want to work on windows with ionic2?
Do I have to install all libraries on Windows machine?
Should I use shared folders for that project is any possibility to hinting in PhpStorm?
base machine - on Windows
virtual machine - on Ubuntu 14 Server LTS
I can't use shared folders cause of slowly cache creating on PHP app and in general PHP apps running then very slowly, even if I moved cache folder to not shared folder on Ubuntu.
If you have Ionic CLI installed you can start new project by ionic start command. It provides you workflow with everything you can need. For example:
$ ionic start cutePuppyPics --v2 //create new project
$ cd cutePuppyPics
$ ionic serve //start server, live reload etc.
Yes, you should install it all on your non-virutal desktop, because if you want to test app on your device, it will be hard to link this device to ADB in your virtual machine.
It works very well with PhpStorm :)

how to install operating system on a virtual machine programatically

It may be a duplicate question but i could not find it anywhere.
Anyway, my goal to install operating system(both linux and windows) programatically on a virtual machine running on vmware hosts.
Although my search, I am quite lost about where to start.
Is there a framework or project you can suggest?
You could use templates; i.e. create a VM, install the Linux distribution of your choice and make the VM a template. Then don't create VMs but deploy the template.
Alternatively, google for the Linux distribution of your choice and something like "network installation". You'll need a DHCP server and probably a TFTP and/or web server.
Working with Templates and Clones
Creating VMware Virtual Machine Templates
Try having a look at Vagrant: http://www.vagrantup.com/. It allows you to install/uninstall a predefined VM from the command line.

How to host the OpenStreetMap Locally

I want to host the OSM (OpenStreetMap) locally. I need the basic idea what are required for hosting the OSM and how the task can be done in a step wise manner. I have to host it in Windows7 environment.
Any kind of help will be useful.
switch2osm contains detailed instructions and requirements for setting up a OSM server. If you have a Windows system then better set up a Linux VM inside it.
A bit too old but I will just put it here for someone who is searching for the same thing.
An exact instance of OpenStreetMap can be hosted locally by following the installation guide of OpenStreetMap.
Quoting from the Link:
"These instructions are designed for setting up The Rails Port for development and testing. If you want to deploy the software for your own project, then see the notes at the end.
You can install the software directly on your machine, which is the traditional and probably best-supported approach. However, there is an alternative which may be easier: Vagrant. This installs the software into a virtual machine, which makes it easier to get a consistent development environment and may avoid installation difficulties. For Vagrant instructions, see VAGRANT.md.
These instructions are based on Ubuntu 12.04 LTS, which is the platform used by the OSMF servers. The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX
We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this software using Ubuntu in a virtual machine, or use Vagrant."