deploy static code to apache httpd server automatically - apache

I have a static website that I would like to deploy to my Apache httpd server using Jenkins or any other methods.
my code base available in GitHub.
My files in server has to be updated in path: /var/www/html

you could set Jenkins to Poll your Repository in Github. You will need to set up the integrations between Github and Jenkins so Jenkins can poll your Repo for changes. Then you can use a Copy tool of your choice, like Rsync or SCP, and run them in the Jenkins Script to copy the file to your server.
Jenkins Polling and SCM Management - https://www.softwaretestinghelp.com/jenkins-job-tutorial/

Related

Apache Ignite Web Console

I am inside a corporate firewall that does not allow me to access the free deployed instance at https://console.gridgain.com/. I downloaded the source and tried to build but again the firewall does not allow me to go outside the network to retrieve the dependencies specified in the pom.xml file.
What are my options
You can download binary build of Ignite Web Console from Apache Ignite, deploy it on premise.
You can also deploy paid version of GridGain, deploy it on premise.
You can download WebConsole from the GridGain website by the following link: https://www.gridgain.com/resources/download
You can install it in your environment and use without needing to access external resources.

How to deploy to Apache httpd using Jenkins

When I search "How to deploy to Apache httpd using Jenkins" or similar searches, all I can find is tutorials on how to run Jenkins behind an Apache proxy.
I want to know how to actually deploy my web application to Apache using Jenkins. I must be going about this the wrong way or something because I assumed it would be an extremely common use case, but I can't find any info on it anywhere, and I don't see any Jenkins Apache httpd plugins
You could install a Jenkins FTP plugin and upload the code to your apache htdocs folder. There isn't an Apache API to achieve that.

Copy Files Over SSH to all servers in deployment group

I am trying to setup CI pipeline for .net core app with VSTS.
I am confused with Copy Files Over SSH step. Server is defined not by deployment group but by endpoint host.
How should I copy my deployment artifacts to ALL servers in deployment group with this tool?
Actually, same applies to "SSH" - it also get executed only on host from Endpoint definition.
Any ideas?
If you're using deployment groups, you don't need to SSH anything to them. The build artifacts will be automatically downloaded to them, since the build/release agent is already running on them and talking directly to VSTS.

Installing Hugo web engine without SSH

I use a basic hosting service that does not include secure shell access, Is there another way that I can deploy Hugo?
After running hugo server for local web development, you need to do
a final hugo run without the server command and without --watch or
-w to rebuild your site.
then, You may deploy your site by copying the public/ directory (by
FTP, SFTP, WebDAV, Rsync, git push, etc.) to your web host.
Since Hugo generates a static website, your site can be hosted anywhere as in the most basic host provide FTP access. For more please see Using Hugo

How to set up an Apache httpd test instance?

For our continuous integration tests under Ubuntu (run by Jenkins), I'd like to test the Apache httpd configuration especially with regard to the rewrite rules.
My plan of attack was (and is):
create a temporary directory,
copy the configuration there and amend some directives,
fire up an Apache httpd on a non-standard port,
run the tests,
shutdown the httpd,
remove the temporary directory.
The repository of our Apache httpd configuration can be found here, my first stab at the test script here.
The process however is very cumbersome as many paths are hardcoded and even the man page for apachectl just recommends reading the source for the various environment variables.
What is the recommended approach to set up such an isolated Apache httpd instance? Are there instructions or field reports that I have missed?
Rather than trying to rewrite configuration files, I suggest using a tool like Vagrant to create and provision a VM that runs your actual apache configuration. Running in a VM provides isolation (you can expose and remap TCP ports as needed) and it also gives you a development environment for interactive testing and debugging.
Instead of creating a temporary directory and modifying configuration files, you would run vagrant up as the first build step. With the right configuration, Vagrant will install whatever packages are needed and provision your apache configuration. Once the VM is up, you can run your tests.
It's easy to get started with Vagrant by walking through the Getting Started Guide to see if it's right for you.