Jump to content
hambeast

How to Set Up an Automated Build Process and How to set up a DayZEpoch Dev Environment

Recommended Posts

What we are doing: Setting up an automated build process to compile the server and mission PBO on restart

Why: Ever needed to make changes to your server but had to wait for server restart?  Ever missed that window and had to wait another 3 - 4 hours till your next restart cycle? I hate that!

Requirements: PBOmanager, notepad++, firedaemon(optional) or knowledge of editing your batch scripts, a dev environemnt (you do have a dev environment don't you?), a dedicated server

Difficulty: Advanced

 

Ok guys, as stated before it is a huge pain in the ass to have to wait till your server goes down to push changes.  Why not automate it so that you can make your changes and be done with them?

 

So to start off you really should have a dev environment that mirrors your production environment.  I'm talking about a dev server here people.  Quick and dirty, just copy and paste your folder containing the Arma2OA install (you know the folder with @DayZ_Epoch_Server in it) to another directory.  Doesn't matter what the name is but you need to make changes here before you make them on your production server so you can verify that you didn't break anything.

 

 

Step 1: Install PBO manager if you have not.  you can get it here: http://www.armaholic.com/page.php?id=16369

Step 2: If you do not have unpacked folders of your PBO's living next to them in their proper directories, unpack your pbo's so that you have a folder with the same name in the same directory.  This is where you will make your changes.

Step 3: Create a batch script to run BEFORE your server starts.  This PBO will automatically pack up the folder into a PBO overwriting your old one.

 

Here is the content of my batch script "pbopack_dev.bat" (note that this is for the dev server, your path will not be the same"

 

 

"C:\Program Files\PBO Manager v.1.4 beta\PBOConsole.exe" -pack "D:\dayz\DEV_Epoch1\@DayZ_Epoch_Server\addons\dayz_server" "D:\dayz\DEV_Epoch1\@DayZ_Epoch_Server\addons\dayz_server.pbo"
"C:\Program Files\PBO Manager v.1.4 beta\PBOConsole.exe" -pack "D:\dayz\DEV_Epoch1\MPMissions\DayZ_Epoch_11.Chernarus" "D:\dayz\DEV_Epoch1\MPMissions\DayZ_Epoch_11.Chernarus.pbo"

 

 

Step 4: Integrate batch script into your current server restart method.  I use firedaemon, if you use a batch script, just make sure you run the previous batch before you start your server but after you have shut it down.  for firedaemon users, just add the batch script to the "pre-service programs".  Give it a nice 15 second timeout to ensure we didn't start the server too fast.

 

That's it.  Verify it works without breaking anything and you can implement this for your production servers.

 

 

Development and Deployment strategy:

 

Ok so I touched a little about this earlier but you MUST use a development environment.  Any programmer who has worked in a professional environment will know that you NEVER EVER EVER make changes to production code.  Firstly, its dangerous, secondly, it makes you look bad if you break a critical system because you were too lazy to test it properly.  Always make changes to your dev server first before you migrate those changes to the live prod environment!!!!!

 

Ideally,  you would want to have an exact mirror of your production server so that you can accurately verify your changes don't break something.

 

Here's how I do it.

 

Initial Setup:

1. Copy entire DayZ server directory to a new one (this only needs to be done once)

2. Backup your DayZ database and insert it as a new one (I use "DayzEpoch_DEV" for this)

3. Modify your hive.ini so it points to your dev database

4. Make changes on dev server and verify results.

 

After Setup:

1. Delete "@DayZ_Epoch_Server" and "mpmissions" directories from the DEV server folder.

2. Copy over "@DayZ_Epoch_Server" and "mpmissions" from your PROD server folder into the DEV server folder.

3. Make changes you need to the folders (no need to recompile as our script above does that for us)

4. Verify changes

 

Migrating changes from DEV to PROD on a Live server:

1. TEST YOUR CHANGES IN DEV

2. Navigate to your PROD server directory and delete the PBO's unpacked folders you wish to modify

3. Copy the unpacked folders from your DEV server to the PROD server

4. Wait for server restart to automatically recompile the folders into PBOs

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Rust
      I've been looking at old resources of GUI's however nothings been working out, the closest I got was
      following an old tutorial from 1.0.5.2, it worked however it also overlapped with the base gui images/values of hunger/blood etc so I ended up removing it
       was what I used
      Is there anything similar that can be used in 1.0.6.1?
    • By Gabriel12237
      Hello Community i need help .

      Sorry for my bad english. Im from germany and i need help.

      I Have Advanced trading and Single currency 3.0 (without global banking) from zupa, and when i sell or buy in the normal trading menu , the trader dont use coins from me. With advanced trading menu the trader use coins for the item.

      Pls help me.

      Thx
    • By chi
      I have looked but can't find any info on this anywhere....
       
      I wanted all of my buildables to be set to right click the toolbox. I have it all set up right with 46 items in the drop down menu. The drop down menu will not load and it breaks the crafting window when I load that many. I haven't tried to figure out how many possible entries I can have in the drop down menu without breaking anything, but i did just try to put 4 items in it and it worked fine.
      Does anyone know:
      ---how many entries the menu will hold without breaking
      ---If it is possible to change the max number of items it holds
      ---Or if i just have to make a second right click entry for the toolbox and have a whole other crafting window pop up with a different sets of items?
       
      Thanks in advance!!!
    • By Zupa
      Version 2.1 Released.
      Alternative selling/buying system. ( Run default & this one next to each other ).
      Supported:
      Config traders Single Currency & Default Currency Selling/Buying everything from and to Gear/Vehicle/Backpack Not supported
       No database traders (database traders make your server slow)  No ability to buy or sell vehicles. What was added to 2.0  Default Currency Supported Item Filter Info display of selected Item Buying to gear and backpack What was added to 2.1Fixed content display of vehicles and backpacks. Description
      Sell directly from backpack, gear or the vehicle ( close) where you were driver from. Decide which items you sell. Traders will only make it possible to trade the items they accept ( goes fully automatic, so only items they accept will be listed on the left).
      You push items to the right to sell, only the items on the right willl get sold.
      Safety measurements
      Double checks what was deleted from backpacks/vehicles so that people can not cheat. Can only sell from your backpack and the vehicle were u was the last driver from ( in 30m radius)  
      Update 1.0 - 2.0 instructions  Delete your old 'zupa' folder  Paste the new 'zupa' folder  Edit the config.sqf to match your server  Done https://github.com/DevZupa/AdvancedTrading/releases/tag/v2.1   Items only show for admins when using infiSTAR AH & Admintools ?! Update infiSTAR to latest version. edit config.sqf to reflect your server correctly.  
      Installation instructions
      Code:
      https://github.com/DevZupa/AdvancedTrading/releases/tag/v2.1
      Install Instructions
      0. Drop the zupa folder in your mission file   1. In your fn_selfactions.sqf
      Place:
      _buyV = player addAction ["<t color='#0059FF'>Advanced Trading</t>", "zupa\advancedTrading\init.sqf",(_traderMenu select 0), 999, true, false, "",""]; s_player_parts set [count s_player_parts,_buyV]; above
      // Database menu _buy = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\show_dialog.sqf",(_traderMenu select 0), 999, true, false, "",""]; s_player_parts set [count s_player_parts,_buy]; 2. in description.ext, add the following on the bottom
      #include "zupa\advancedTrading\ZSCdefines.hpp" // if u don't have it from ZSC #include "zupa\advancedTrading\advancedTrading.hpp" 3. Add the following exceptions to your antihack if needed
      AdvancedTrading 711197 4. Edit the config.sqf to match your server.
       
      Screenshots:
       
       

       
    • Guest
      By Guest
      Introducion
       
      I was looking into a Problem, where the FPS drops, when players enter a City or any Place with a large amount of Objects placed. After fushing around a while i have noticed, that actually ALL Objects are being updated. This includes houses, cras cutters, bins and fences, as also Modular Buildings like Wooden Walls. So my thought was, that counting and updating all of those Objects may result in a massive Server Load. For testing purposes i made up an array with all arma2 Buildings and a check to not Update those. Result: All of these Objects where un-breakable, can't be killed or damaged anymore. Also a slight FPS increase, but nothing really "breaking".
       
       
      Before we Start
       
      You must notice, that these changes make all Objects invincible. Also it is highly recommended to create a Backup, before you start editing.

      Requierements:
      - PBO Manager (For editing Server Files)
      - A custom "variables.sqf" in you Mission Folder
       
       
       
      Setting up the Variable for Objects that should not be updated (Client side)
       
      These Changes are made in the variables.sqf, located in your Mission Folder.



       
       
       
      Changing server_updateObject.sqf
      These changes are made in dayz_server.pbo\compiles\server_updateObject.sqf - This does not effect any custom mods you might have installed, for example the Vehicle Key (thanks, sir - that thing is awesome).
       



       
       
      Removing unnecessary Functions
       
      This is yet still not effecting any mods (not so far i know) - but will result in a faster update of objects, because first of all we'll be using "if", instead of "switch" (If is concidered to be much faster, then switch) and secondary, we will use one function for all Hitpoint actions such as "killed", "damage" or "repair".
       




      Keep in mind, that you can customize the array of object, that should not be updated by simply adding or removing an object, but please note: DO NOT, AT NO TIME, NEVER put Objects like Doors, Safes or other Objects that requiere some sort of action - in that array. Reason: As you for example open a Door, the State well more likely the "position" of the door is being updated, forcing the door to actually open. If you forbid this, you obviously can't open Doors anymore. This does not effect Objects like for example Loot, Stairs, Ladders, etc..
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...