We are a small development team (4 developers) with the following environment:
Windows 10 (64-bit)
Jenkins version 2.150.2
PCs connected through a CLOSED NETWORK (no Internet connections)
no email
We would like to use Jenkins notifications, so developers would be automatically notified for example when a build gets broken.
Jenkins Plugin Manager lists many (several tens) plugins under the section Build Notifiers, but we are not sure which one would be appropriate.
Something like Slack is not an option, because Slack servers are cloud-based and we have a closed network.
Something like Mattermost (a self-hosted alternative to Slack) would be overkill: requires Windows Server, MySQL, and what not (see https://docs.mattermost.com/install/prod-windows-2012.html).
Basically, we just need a small window to pop up on developers' screens when something goes wrong in Jenkins. What would be a simple way to achieve that?
You can add HipChat plugin assuming you can setup an internal HipChat server
HipChat Server Host: The hostname (and optionally the port number) for the HipChat server in use. Note that the server will always be accessed via HTTPS
And send notification to users
The HipChat Notification plugin provides the previously mentioned hipchatSend step that you can use in your pipeline. The only required (default) parameter is a message.
You can use AnyStatus to monitor Jenkins jobs and views.
AnyStatus is a desktop notifications app for Windows that helps developers keep track of services such as Jenkins, Azure DevOps, TeamCity, AppVeyor and more. AnyStatus will notify you when your Jenkins jobs start, complete or fail. It shows the progress of jobs while they are running and enables you to start or stop jobs remotely.
AnyStatus can also monitor other resources such as databases, network, web servers, computer resources and more. You can also develop your own plugins.
AnyStatus is a standalone application that can run in a closed network.
No server or internet connection is required.
Disclaimer: I am the author of AnyStatus.
Related
I need some guidance and advice please on if / how I can implement a CI / CD pipeline for a corporate PHP Laravel application that is hosted on an internal server with limited access and no public IP. Unfortunately my DevOps knowledge is limited and despite a lot of Google searches, I have no idea if I am on the right track or if I am a million miles away. Everything that I have read so far looks at using Web Hooks which as far as I can tell are reliant on a public IP / domain.
At present I can work on the application on my laptop and push changes to BitBucket Cloud. While I have managed to create a bitbucket-pipelines.yml file that will automatically build and test any branches that are pushed, I then have to access the server to pull the code manually and run the various scripts as required, which I would much prefer to automate.
I need to understand please what options there are for implementing continuous deployment given the circumstances and limitations?
If anyone could offer some pointers then I would be very grateful.
Thanks
You can't push to a machine that is unreachable but there are some alternatives.
Configure a bastion host, so an external CI/CD runner can ssh through it into your server. Allow inbound port 22 connections from your CI/CD provider CIDR blocks to your bastion host https://ip-ranges.atlassian.com/
Setup a CI/CD self-hosted runner in the same network than the server. https://support.atlassian.com/bitbucket-cloud/docs/runners/ Use that runner for the deployment step to ssh into your server private IP address.
Setup a pull-based deployment strategy. Your deployment step only registers the new wanted version, e.g. moving a release/production branch on the commit ref where the deploy was triggered. In your server, setup some kind of subscription to the latest release/deployment, e.g. a cron task to frequently fetch the production git branch. Upon changes, restart services and run any task you need. ansible-pull can be handy for this purpose.
I'm little confused about Jenkins and was hoping someone could clarify some matter for me.
After reading up on Jenkins, both from official docs and various tutorials I get this:
If I wanna set up auto deplyoment or anything Jenkins related, I could just install docker jenkins image, launch it and access it via localhost. That is clear to me.
Then, I just put Jenkinsfile into my repository, so that it knows what and how to build my repo and stuff.
The questions that I have are:
It seems to me that Jenkins needs to be running all the time, so that it can watch for all the repo changes and trigger code building, testing and deploying. If that is the case, I'd have to install Jenkins on my droplet server. But how do I then access my dashboard, if all I have is ssh access?
If Jenkins doesn't need to be up and running 24/7, then how does it watch for any changes?
I'll try to deploy my backend and front apps on docker-compose file on my server. I'm not sure where does Jenkins integrates in all that.
How Jenkins can watch for all the repository changes and trigger code building, testing and deploying?
If Jenkins doesn't need to be up and running 24/7, then how does it watch for any changes?
Jenkins and other automation servers offer two options to watch source code changes:
Poll SCM: Download and compare source code at predefined intervals.This is simple but, hardware consumption is elevated and is a little outdated
Webhooks: Optimal functionality offered by github, bitbucket, gitlab, etc. in which Github, for example, at any git event, makes an http request to your automation server, sending all the information like branch name, commit author, etc). Here more info about webhooks and jenkins.
If you don't want a 24/7 dedicated server, you can use:
Some serverless platform or just a simple application able to receive http posts + webhook strategy. For instance, Github will perform a post requet to your app/servlerless and at this point, just execute your build, test or any other commands to deploy your application.
https://buddy.works/. It is like a mini-jenkins.
If I'd have to install Jenkins on my droplet server. But how do I then access my dashboard, if all I have is ssh access?
Yes. Jenkins is an automation server, so it needs its own dedicated server.
You can install jenkins manually or use docker in your droplet. Configure 8080 port for your jenkins. If everyting is ok, just access to your droplet public ip offered by digitalocean, like: http://197.154.458.456:8080. This url must load the Jenkins dashboard.
We are using a server running Windows Server 2012 R2 for our TFS work item management and source control.
But we want to set up a dedicated Build server.
We are running TFS 2018 Update1.
I've downloaded the latest available Build agent and ran the script 'config.cmd' from the dedicated Build Server.
In previous versions of TFS you were at least supposed to run the TFS Installation Wizard if I'm correct to configure the Build Service. But this changed since TFS 2015.
But where can you see that my dedicated server (that I used to run config.cmd) is actually used for executing the Build process?
I cannot really find information on how to install and configure multiple servers for running TFS.
as far as I know running the config.cmd is enough. The machine where the script is executed will then register with the server instance - during the configuraiton you had to specify the TFS Server URL right?
On the Server side, you can go to the Agent Pools (where you initially downloaded the Agent Configuration). After clicking on the Agent Pools on the left-hand side you should see all Agents registered to that Queue. To which Queue your agent belongs was as well specified during the configuration on the agent itself as part of the config.cmd.
If you want to add more agents, you can simply run the config.cmd on other machine and register your agent with the same server instance. It is even possible to have more than one agent on the same physical hardware if you want that.
We are currently running several Projects on several Servers. For our workflow we installed Telnet to communicate with theses servers. More than this, we run the Build/Make mechanism (own development php) on theses servers.
Now we like to introduce a CI mechanism to this. Therefore we installed a central Jenkins application, from which we like to trigger all these builds. Our standard way is to open a telnet connection an trigger the build command on shell. Now we like to adopt this mechanism and bring it to Jenkins.
Is there a possibility to open a Telnet connection via Jenkins?
Installing a slave Jenkins on the remote Servers is a not as much preferred option, because we don't like to install more Software on the server as necessary.
Yes, It is posible, you can use pipeline to include groovy program that use telnet commands, it could be one posibility another you can use ssh commands in a free style job.
We are developing a reporting application for my organization, which is aimed to monitor jenkins builds for specific jobs. I know there are API to get the status of the jobs and other information. But, it requires me to keep polling jenkins with these api requests. Would like to know, is there any other way like events thrown by jenkins so that my application can listen and do the needful ?
You can "throw" whatever you want in your Jenkins build. Question is: what can you application "catch"?
You can make a POST or GET request at the end of the build to your application.
You can upload files to remote hosts.
You can update files on local host.
You can execute batch or shell scripts, remotely or locally.
So what can your application listen to?
Got this plugin https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin, this solves my requirement