SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 13/05/2017, 07:40 PM   #1
Michael@Belgium
High-roller
 
Michael@Belgium's Avatar
 
Join Date: Dec 2010
Location: Belgium
Posts: 3,049
Reputation: 982
Exclamation [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

Ah man, how much I wanted this... I'm so relieved. Finally I've made it to work, and well here you guys have it too!

Information

So this is a mix of files/release that will make your developing easier (well, in my opinion). By doing one git command your server will update automaticly on your vps/dedicated server.
Just the fact that you don't need to upload new .amx every time and need to edit your /updates command ... or like people saying "what's new?"

This is all not needed anymore!

It works like this; you push your update to your remote, bitbucket will send info to your vps saying the script is updated, your vps will update the gamemode files, your database will get updated and later your server will check if there's a new commit hash than before. If yes, the samp server will automaticly update/restart

Media



How to

Github/download
__________________
Mah Github. - Mah Youtube
Interested in a full featured and cheap derby gamemode or need host-tab ? Contact me on skype: michael.belgium
Michael@Belgium is offline   Reply With Quote
Old 13/05/2017, 08:34 PM   #2
iLearner
Huge Clucker
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 201
Reputation: 54
Default Re: [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

It's cool, but to be honest I wont be using it... direct way is way easier you know.
iLearner is offline   Reply With Quote
Old 15/05/2017, 10:05 AM   #3
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Eindhoven, NL
Posts: 3,598
Reputation: 1346
Default Re: [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

Quote:
Originally Posted by iLearner View Post
It's cool, but to be honest I wont be using it... direct way is way easier you know.
depends. When I had a server I let it restart at 02:00 am each day by pulling all updates in and automatically recompiling my mode.

My workflow was:

1) Write code
2) test
3) commit & push
4) goto 1

Never had to touch the server, even crashdumps were automatically uploaded, which means I never had to ssh/rdp into the server and could do everything from my local pc (thanks to git).

Without git:

1) Write code
2) test
3) recompile the mode yourself
4) connect to server console (be it ssh or rdp)
5) shutdown server
6) replace binaries
7) start server
8.a) if everything works goto 1, else:
8.b) crash
9) find and download crashdump
10) goto 1)

You are probably using git anyway (or svn for the ones in the stone age) which means you are uploading your code twice, which sucks on slow connections. And that's why you want to automate the process. Great to see someone released a howto on this.

Ofcourse my tip would be to make it a cronjob instead of an php file that ssh's to a server, the server should do it itself. Git has commands to check if there are commits to be pulled. Would also be way more secure.. don't trust php.
__________________

Do not contact me for private help, please stop wasting your time trying to offer me a job
(Especially if you cannot pay the market rate for a developer)
If you are looking for scripters/mappers/staff/whatever look here
The only help I offer is my occasional reaction on the public forums

Last edited by Gamer_Z; 15/05/2017 at 10:47 AM.
Gamer_Z is offline   Reply With Quote
Old 15/05/2017, 10:22 AM   #4
iLearner
Huge Clucker
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 201
Reputation: 54
Default Re: [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

Quote:
Originally Posted by Gamer_Z View Post
depends. When I had a server I let it restart at 02:00 am each day by pulling all updates in and automatically recompiling my mode.

My workflow was:

1) Write code
2) test
3) commit & push
4) goto 1

Never had to touch the server, even crashdumps were automatically uploaded, which means I never had to ssh/rdp into the server and could do everything from my local pc (thanks to git).

Without git:

1) Write code
2) test
3) recompile the mode yourself
4) connect to server console (be it ssh or rdp)
5) shutdown server
6) replace binaries
7) start server
8.a) if everything works goto 1, else:
8.b) crash
9) find and download crashdump
10) goto 1)

You are probably using git anyway (or svn for the ones in the stone age) which means you are uploading your code twice, which sucks on slow connections. And that's why you want to automate the process. Great to see someone released a howto on this.

Ofcourse my tip would be to make it a cronjob insteado f an php file that ssh's to a server, the server should do it itself. Git has commands to check if there are commits to be pulled. Would also be way more secure.. don't trust php.
Convincing, might give it a try.
iLearner is offline   Reply With Quote
Old 15/05/2017, 11:25 AM   #5
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Romania
Posts: 990
Reputation: 61
Default Re: [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

I was trying to do this but thanks for your tutorial!
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 15/05/2017, 11:45 AM   #6
YouHack
Huge Clucker
 
YouHack's Avatar
 
Join Date: Jan 2017
Location: Lost in Morocco
Posts: 265
Reputation: 21
Default Re: [MV]_AutoDeploy - Use git to your advantage to auto-update your sa-mp server on your vps from local!

if it was just a Y_INI file to read from it updates ^^ and write to it in-game would be useful
YouHack is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Update CoR3 Scripting Help 1 28/12/2014 09:56 AM
Auto Update (Suggestion) Saurik General 44 12/05/2012 12:41 PM
Using LAN to my advantage Infinity Everything and Nothing 6 14/03/2012 08:44 PM
Auto Update? TheJayMan Scripting Help 2 01/10/2011 10:46 PM
MySQL auto update or something. KaleOtter Help Archive 10 18/05/2011 12:49 PM


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.