How to establish connection between puppet master (public network) with puppet agent (private network)? - connection

I need to establish connectivity with the puppet master and agent where the master is in the public network and the agent in the private network.
Highly appreciate it if someone guided or give me a clue for the solution.

Related

Automate network disconnection on VM while maintaining remote connection from TFS job

I have the following setup:
Microsoft TFS with jobs and pipelines
A VM under Virtual Machine Manager (VMM) which has Windows10
The job from TFS can connect to VM to run commands remotely
My goal is to automate test case when there is no network connection inside the VM (mainly no internet connection) to verify that some features of my software under test behave as expected and do not use network to achieve my test calls.
Currently I use powershell on target machine to run scripts remotely in the VM https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/powershell-on-target-machines?view=azure-devops .
I made research online already but I didn't find something specific to TFS and VMM.
Perhaps it is worth it to mention that I found this script online:
#!/bin/sh
ip link set ens32 down
sleep 20
ip link set ens32 up
But the script was written in a Linux and SSH connection context, which isn't the same as my environment.
Is there anyway to achieve automation of networking disconnection remotely and then turning on again the network connection state ? (simulation tools are also ok for me if they do achieve my goal and can be integrated in TFS pipeline or VM tools installation).

How to set up an Azure DevOps service connection or endpoint to my localhost Jenkins install

I have Jenkins installed on an Ubuntu 18.04.3 LTS desktop PC on my localhost.
I also have an AzureDevOps repo on which I can successfully run a build, through a Jenkins pipeline job, connecitivity achieved via my AzureDevOps personal access token (PAT).
I am now trying to set up a Jenkins service connection or endpoint in AzureDevOps, to enable me trigger an Azure DevOps pipeline release whenever a Jenkins build completes successfully.
To achieve this in AzureDevOps, I am trying to set up access to Jenkins via a Jenkins service endpoint. The endpoint configuration requires among others, a Jenkins "Server URL" (screenshot below). Not surprisingly, AzureDevOps is unable to connect to my Jenkins instance as it's running on my local machine and therefore not publicly accessible.
Any suggestions on how I can overcome this hurdle would be most appreciated.
How to set up an Azure DevOps service connection or endpoint to my localhost Jenkins install
As we know, in order to receive the service hook notifications, you'll need to expose a port to the public internet.
To expose a port to the public internet, you can try to use the tool ngrok:
ngrok exposes local servers behind NATs and firewalls to the public
internet over secure tunnels.
Please check the document Configure a service hook for PR events for some more details.
Hope this helps.

Jenkins - How to build a master job in slave machine?

Initially, I configured the master and slave connection setup in windows machine by launching Java web start method. And then Created a Job in Master machine. Now my question is how to assign a master job to slave machine to build the job. Please provide me the steps to follows. Thanks you.
And please let me know is slave machine requires master machine URL for Connecting Master Slave Connection setup?
You can tie your job on whichever slave you want.
There is option of "Restrict where this project can be run", You can provide jenkins slave name on which this job should always run.
Answer to your last doubt. There is standard methods to connect slave to master, it depends how are you connecting the slave to master.

Handshaking of Master Slave In Jenkins shows Connecting but doesn't get Connected

I am trying to establish master slave connection between two system.So I have configured a node Myslave as given in Jenkins Master Slave Documentation(https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines)
But when I try to connect to the master on the slave system the Jenkins Slave Agent shows Connecting to master(i.e my system ip address) but doesn't connect.
There is no error.I am not able to determine the problem.

jenkins slave server

I have a network issue in that I have 2 geographical locations. Each location has an ESX environment and I have to bridge from the management network to each production network - I cannot use routing. Location A cannot connect to location B's production network. However Location A's management network can connect to Locations B's management network.
I am running Jenkins in location A but I also need to have Jenkins run jobs in Location B's production network. So I was thinking if I could set up a master slave Jenkins server solution. Jenkins Master would be in Location A and Jenkins Slave would be in Location B.
I would like to have all management aspects through one Jenkins server and as the 2 Jenkins servers could communication on the management network, I could have the master initiate jobs on the slave to get run jobs on the production network in Location B.
Would that work?
That should work fine as long as you can get TCP/IP connectivity to/from the master and slave. You can set up the slave so that it always communicates with the master on the same port, so if you open that port in the firewall you should be OK.
Take a look at the Jenkins Wiki for full details on how to set up slaves.

Resources