Remote Vagrant Dev Server - vagrant

I am a web developer and I am currently using Vagrant + VirtualBox to run my projects. I have a Proliant server at home that I am not using at the moment. I was thinking, is there any way I could use it instead of the VM, so I could run my projects remotely?
P.S: Can you think about any other cool use cases for this server?

Vagrant is design to work with VMs or containers when using a docker provider but not bare metal server simply because the goal is to be able to build, use, destroy and rebuild environment programmatically so using a base-metal server break the main use case.
The possible course of action is to install the hypervisor on your personal server and then configure your Vagrantfile to use the remote provider instead of the local. You'll have as a direct benefit the ability to create a lot of instance since your server will most likely have more resources than your local laptop/desktop workstation.

Related

How to login to Jenkins from any network

I’m an absolute beginner when it comes to setting up a Jenkins environment but I have just installed Jenkins on a MAC v10.15.5 using home-brew and would like the capability to:
Open a web browser
Login to Jenkins from any machine on any network
Trigger a job.
I’m able to do this using a different machine on the same network but unable to do this using a machine on a different network. I changed the "httpListenAddress" value within the jenkins-lts.plist file to 0.0.0.0 to allow the web interface to be accessible from anywhere as mentioned at https://www.macminivault.com/installing-jenkins-on-macos/ but apart from that I’m not sure where to go from here.
I’ve heard about Apache Tomcat but not sure if it's necessary for what I need to do. If anyone can provide instructions / safe approaches about how to login to the Jenkins environment on my MAC from any network that would be appreciated.
To get jenkins web interface use $JENKINS_HOST_IP:8080 (by default jenkins uses port 8080) and then make first-run-configure.
Login to Jenkins from any machine on any network - it depends on network topology, what is used in your organisation. So, to reach jenkins host from any network where should be allowed traffic from/into network where jenkins host is placed.
Trigger a job - where are a lot of triggers you can use. Take a look at official documentation here

Access local http server coming from a VM from another VM using VirtualBox

I have 2 VM running, one is giving me a local server on an address like www.x.com (FREE BSD 64bit), which I can access from my browsers locally.
My question is, if I use another VM to test with windows and IE, how can I access my www.x.com given from my other running VM with the second VM? That means, from IE?
Is that possible?
Thanks a lot, this would help me a lot, I have to deploy to our testing servers everytime I want to test something on IE and is quite annoying!
Possible, of course. To connect to your VM both from host system and another VM you can set bridget networking for both VMs (BTW, maybe you already using network bridge). There are also other possibilities, but bridget network is easiest way, IMHO.

Unable to access MongoDB within a container within a Docker Machine instance from Windows

I am running Windows 7 on my desktop at work and I am signed in to a regular user account on the VPN. To develop software, we are to normally open a Dev VM and work from in there however recently I've been assigned a task to research Docker and Mongo DB. I have very limited access to what I can install on the main machine.
Here lies my problem:
Is it possible for me to connect to a MongoDB instance inside a container inside the docker machine from Windows and make changes? I would ideally like to use a GUI tool such as Mongo Management Studio to make changes to a Mongo database within a container.
By inspecting the Mongo container, it has the ports listed as: 0.0.0.0:32768 -> 27017/tcp
and docker-machine ip (vm name) returns 192.168.99.111.
I have commented out the 127.0.0.1 binding host ip within the mongod.conf file also.
From what I have researched so far, most users resolve their problem by connecting to their docker-machine IP with the port they've set with -p or been given with -P. Unfortunately for me, trying to connect with 192.168.99.111:32768 does not work.
I am pretty stumped and quite new to this environment. I am able to get inside the container with bash and manipulate the database there however I'm wondering if I can do this within Windows.
Thank you if anyone can help.
After reading Smutje's advice to ping the VM IP and testing it out to no avail, I attempted to find a pingable IP which would hopefully move me closer to my goal.
By doing "ifconfig" within the Boot2Docker VM (but not inside the container), I was able to locate another IP listed under eth0. This IP looks something like 134.36.xxx.xxx to me and is pingable. With the Mongo container running I can now access the database from within Mongo Management Studio by connecting to 134.36.xxx.xxx:32768 and manipulate the data from there.
If you have the option of choosing the operating system for your dev VM, go with Ubuntu and setup docker with all of the the containers you want to test on that. Either way, you will need to have a VM for testing docker on windows since it uses VirtualBox if i'm not mistaken. Instead, setup an Ubuntu VM and do all of your testing on that.

Turning laptop into a server to run spring tool suite over the internet

I am trying to run a website from my computer using Spring Tool Suite (STS). Using pivotal tc Server I can access this website that I made by running the server and using localhost:8080 as a url.
My laptop contains other software that is permitted to only run in the laptop and it is needed to run my code in Spring tool suite.(School policy to SSH's into another computer to get access to my database; it is a requirement)
How would I be able to access that website that is running in my laptop that uses pivotal tc Server. Please assume I know nothing about IP address and DNS. Also, assume that I can move my laptop around like a mobile device.
To solve this problem you need to tunnel to your local machine

Using vagrant on EC2

I need to setup a web server and a database server on EC2.
It should be easy to migrate to another service provider later.
Currently, I have a web server and a database server, each running on separate EC2 micro instances with software installed there remotely.
Can we run a vagrant box on these micro instances with pre-installed and pre-configured softwares like LAMP stack and use that instead. So I will end with 2 vagrant boxes , one for web server another for database server.
Amazon provides already means to copy an instance but it is copied to another EC2 instance only probably .. If there is need to move to some other provider, it will be same process of re-installing all. So, an own virtual box installed on Amazon's virtual box is what i was looking into..
I don't know how good or bad it is.. I doubt if this will affect performance as well. Please share your views. Target is to have env prepared locally and have flexibility to deploy it on any service provider easily.
Running vagrant inside your AWS box is probably not the right solution. Have you looked into the Vagrant AWS provider?
That will allow you to setup and provision your AWS boxes with Vagrant and Puppet or Chef... if you are using Puppet or Chef to provision your servers then you will have a very portable "scripted" install for your servers that can easily be moved to another provider at a later date...
So running a virtual machine, on another virtual machine probably isn't the best. But if you want to install Vagrant on Amazon Linux you can do:
wget https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rpm
sudo rpm -ivh vagrant_2.2.4_x86_64.rpm
The RPM is the Centos version from the downloads page here: https://www.vagrantup.com/downloads.html
But then you cannot install virtualbox to run a VM. So it doesn't actually work anyways.

Resources