This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Deploy scripts and Sentora: what am I overlooking and best practices?
#1
Deploy scripts and Sentora: what am I overlooking and best practices?
As it turns out, it appears that running Linux commands via PHP is not going to work. While I can understand the reasons for that, it does present a problem with the company I'm in.

We have a deployment script that's written in PHP (written by my predecessor though I could modify it to an extent) and involves executing Linux commands such as rsync. Whenever our dev team pushes to a specific branch in our code repo, it normally triggers a hook that calls the PHP script which, given that it passes security checks, proceeds to call Linux commands which copy the files to the specified directory via rsync.

Turns out that it appears not to work here partly due having a completely different folder structure (we used cPanel with SSH access before) and it appeared that we can't run Linux commands straight from PHP since the pre-deployment checks for dependencies simply stalls at the point where it says "which <dependency>".

I was wondering what would be the best approach for this. Off the top of my head, I was thinking of having one of our other servers do the pulling which then FTPs to the Sentora server and drop the files using that. I'm sure there's a better way of doing this though and would rather not have one of our other servers acting as a third wheel.
Reply
Thanks given by:
#2
RE: Deploy scripts and Sentora: what am I overlooking and best practices?
Did you check ansible? That's currently awesome for server orchestrations/ jobs execution on remote servers.

Beside that using variables will allow any script to adapt PHP works fine atop shell scripts but I favor more and more using Python or in complexe scenarios build an ansible playbook.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: Deploy scripts and Sentora: what am I overlooking and best practices?
Well, that's a start but I'd rather hunt down open source solutions first. We're not exactly a very large company and I want to limit expenses.
Reply
Thanks given by:
#4
RE: Deploy scripts and Sentora: what am I overlooking and best practices?
Ansible is free in case you missed it.
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 3 ,971 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,590 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 3 ,334 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)