How to auto deploy code on multiple droplets/servers having LAMP stack in DigitalOcean via SSH? - web-deployment

Im using LAMP stack droplets. Im looking for automated deployment tool or method to push my code on multiple servers at once. Im using Load balancer for 2 droplets. When i push some code to droplet1, it should also be auto deployed to server2. I tried using Git hooks 2014 answer from DO Community, but was not successful. Or how to use RSYNC or any method? Actively looking for answers.

You can use the Ansible technology! It allow you to deploy your code (and more, you can be impressed) to an infinite number of servers.
There is a documentation for a Continuous Deployment system: https://docs.ansible.com/ansible/latest/user_guide/guide_rolling_upgrade.html

Related

ACORE API, assistance with errors and deployment

I'm having trouble with setting up ACORE API's and then having them work on a website.
Background:
Azerothcore running 3.3.5 on a debian standalone server, this has the Database, Core files and runs both the world and auth server basically a standard setup that is shown in the how-to wiki.
I also have a standalone web server, on the same subnet, but it's a separate server running linux and normal web server stuff, this has a wordpress installation with azerothcore plugin for user signup etc.
I'm trying to add the player map (https://github.com/azerothcore/playermap) and the ACORE-API set of functions (server status, arenastats, BG que and wow statistics) (https://github.com/azerothcore/acore-api)
Problem:
I understand the acore-api must be run in a container (docker or whatever) on the server, which I have done and it binds to port 3000, I can then go to the local ip:3000 and it brings up this error. (all db's etc are connecting and soap is working)
error 404 when navigating to IP:3000
I do get a few errors when running NPM install seen here: I'm not sure if they would be causing any issues or not.
screenshot of NPM errors on install
But further that, when I put say 'serverstatus' on the webserver (separate server) and configure the config.ts file I can't seem to get anything to display.
I'm not sure what I'm doing wrong but is the same scenario for all of the different functions for the acore-api
How are these meant to be installed and function? I feel I'm missing a vital step.
Likewise, with PLAYERMAP I have edited the comm_conf.php and set the realmd_id, but when loading the page, I do get the map, but the uptime is missing and no players are shown?
Could someone assist if possible?
Seems like an issue with NodeJS version. Update your NodeJS to latest LTS version 16.13.0 (https://nodejs.org)

How to deploy a Realm Object Server

I'm looking into using the new Realm Mobile Platform for a project of mine. I've gone through the guides and was able to get it up and running locally no problem. My question is, what's the best way to deploy the Realm Object Server so it can be run remotely? I read through the guide found here but didn't really understand it. I only have minimal experience deploying a rails app to heroku. How can I get it deployed to Heroku or a similar service? Any help is appreciated. Thanks!
It's hard to tell you what the "best" way is. There are always drawbacks and benefits to any setup, and everyone has different goals and objectives, so I don't think there is an objective "best way to run it," as you say.
The Realm Object Server doesn't support Heroku for the time being (or at least, no easy one-click-install integration). We know that this is something that people want, so it's on our radar, but I can't give you a definite answer as to when or even if we will do this one day.
The way most people run the Object Server is by running a virtual machine, and running the service inside of that. There are multiple ways to achieve this: start a virtual machine with your favourite cloud provider, and then install the Realm Object Server on top of that. Alternatively, Realm also provides an AMI image, which is Amazon lingo for "a pre-configured virtual machine image," that contains the Object Server pre-installed, and allows you to run your Object Server at the click of a button.
Please bear in mind that Realm Object Server is currently packaged for RHEL/CentOS 6 & 7, and Ubuntu 16.04.
Here are some links that should help you get started:
A basic tutorial on how to setup Ubuntu 16.04 on Digital Ocean
AWS' documentation on launching an EC2 instance from an AMI
Try this image to run realm-objserct server on openshift online.
https://hub.docker.com/r/viksgyl/realm-object-server/

WordPress project setup - Trellis, Valet or Docker?

I want to start a new WordPress project with another developer. The decisions we made are:
We want to use Bedrock as the WP structure
we want to use Sage as the WP theme
We put the project in a GIT repository
I now ask myself if we should use Trellis, Valet or Docker.
My personal opinion is that Trellis / Docker is a bit too much for a project with two developers working on it. Additionally my experience with Vagrant is not very positive, as it was very slow when I used it. My favorite would be Valet, because it's so slim. The repository I would use is Beanstalk, from there I would trigger my deployments to my test and live system.
Additionally I am not 100% sure if my server to which I want deploy my project also needs Docker installed - does anybody knows that? And what happens when my server runs on Apache and not Nginx?
Now that Docker has native Mac and Windows apps you wouldn't need Vagrant for local dev, and running a series of Docker containers is much faster than a full-fledged VM with Vagrant+VirtualBox. Right now I have MariaDB + PHP-FPM + Nginx + WordPress + PHPMyAdmin, and the whole thing is really fast relative to my previous experience with Vagrant. Faster as in: faster initial install, faster to start/stop, faster to make changes and have them reflected after a restart. I just replaced MySQL with MariaDB in a matter of minutes (mostly fumbling with having the proper syntax in my docker-compose file).
The beauty of Docker appears precisely when you want to switch components (say Apache vs. Nginx). In WordPress' case, they provide images on Docker Hub that either include Apache or PHP-FPM (in the latter case you just add a Nginx container to your stack).
That said I just got started with Docker and there are some kinks to figure out, but it's worth figuring out.
I haven't deployed with Docker yet but I plan to test that next once I've got local dev fully working as intended. It's optional though, you could always deploy with Git webhooks or whatever you were using up to now.

What is a good hosting solution for running node.js with R / Rserve?

I need to run R with Node.js, using Rio (https://github.com/albertosantini/node-rio) as the node binding to Rserve.
I like Heroku but this seems like it is pushing the Heroku envelope beyond what it or I am competent with:
I've looked briefly into installing a custom buildpack
https://github.com/virtualstaticvoid/heroku-buildpack-r
to run simultaneously with node.js:
https://github.com/ddollar/heroku-buildpack-multi
This all seems pretty scary. Anyone got any good advice for how best to host this? My app works just fine locally.
http://prgmr.com/xen/
I currently use this solution to run my Node.js server and it's currently great.
They have wonderful support and they're uptime is 100%. I cannot recommend this any higher, but you will need to know how to set up a simple OS and run it from the ground up.
For example, if you want to run a server without having it stop when you close the SSH connection, you would use screen node script.js and press [control] + [A] + [D] keys.
You might already know this, so simply take my advice and view the website.
After some research and recommendations from Heroku, I believe the Heroku solution would be
Use https://github.com/virtualstaticvoid/heroku-buildpack-r
in combination with
https://github.com/ddollar/heroku-buildpack-multi#readme
to build a multi build pack.

Setting Pydev to use with Openstack

I am currently looking into OpenStack and want to know about the development environment that I could use for debugging different issues that arise when I run it on my VM. By development environment I am referring to the IDE that can help me understand the functioning and call flow of OpenStack. I have Pydev installed with Eclipse on my machine but I don't know how to run all the Openstack dameons (nova-api,nova-compute,nova-network, glance-api etc.) together in Pydev.
Any help would be much appreciated.
(P.S: I am trying to avoid pdb for now, as Pydev would allow me to see the code and my location in it more conveniently...)
I'm not familiar with OpenStack, but if you could use pdb, you could definitely use the PyDev remote debugger the same way: http://pydev.org/manual_adv_remote_debugger.html
Looks like this question got asked on the OpenStack dev mailing list too on the thread [OpenStack] Development/Debugging where there are some answers.

Resources