Dev Environment for ISPConfig

Discussion in 'Developers' Forum' started by pyte, Sep 13, 2023.

  1. pyte

    pyte Well-Known Member HowtoForge Supporter

    Hi,
    i'm very new to contribution to large projects and was wondering how some of you test their patches.
    After making my changes within my forked ispconfig repo how do i test them? Right now i have a test machine with ISPConfig installed where i copy over the files that i've changed and test them there, but that seems like a lot of hassel especially for testing minor fixed or changes.

    Is there a comfy way to test changes? Some insights from experienced devs would be great :)
     
    Last edited: Sep 13, 2023
  2. michelangelo

    michelangelo Active Member

    I'm testing my code via VMs and occasionally via a physical server in my local network.
    In certain cases I wish I had a fully fletched ready to use CI/CD environment for my code changes, so that I don't have to copy/sync/checkout the changes everytime again.

    For less demanding situations VMs + Snapshots + a gitted /usr/local/ispconfig might be the way to go.
     
    ahrasis likes this.
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    Thank you for the insight :)
    As long it is no issue that the automated certificate creation does not work a Dockerimage could be possible too. I might give that a try too.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Personally, I use vm's for testing as well, doing snapshots is really nice and speeds up things and allows you to return to a clean system easily without having to install from scratch. I'm using VMware workstation, mainly because I have used it for a long time, and I'm used to it, and I use it for exporting VM images for Howtoforge. But there are other free alternatives like VirtualBox, which should do the same job. The problem with using Docker instead of full virtualization is that you never know exactly if a problem is just caused by limitations in Docker or in your code, so I would always prefer a 'real' VM like VMWare, Virtualbox or KVM over a container for testing.

    When it comes to testing a single file that I'm working on, I just copy it over to the test system using WinSCP or functions of my dev IDE (after enabling root ssh login in the test system) to test it before committing it to GIT.

    If you want to test your whole test branch, you can always check it out using git and then run 'php update.php' in the install folder of the checked-out code to update your test install with the code you just checked out.
     
    ahrasis likes this.
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I simply use notepad ++ (with ssh plugin) to code and then copy and commit it directly to an ISPConfig test server either directly to a working ISPConfig or to an ISPConfig install folder.

    I think for now I have figure how to properly rebase my git before I can help again as it has been quite outdated and messy.

    I am still not used to using git compared to github.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I think you can also just delete your fork using Gitlab and then create a new one. On Windows, I recommend you use TortoiseGit instead of git command, it ntegrates nicely into file explorer and makes using Git much easier.

    Gitlab which we use as GIT system on git.ispconfog.org basically provides the same features as GitHub, its just self-hosted which GitHub does not offer.
     
    ahrasis likes this.
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I remember I mistakenly deleted my account last time I tried something like that, my old account is ghost now. But I'll try the suggested method for sure.
     
  8. pyte

    pyte Well-Known Member HowtoForge Supporter

    Thank you all for your insights. I might make this work with a plugin for my neovim setup to push the changes into a testsystem upon writing the file.
     
    ahrasis likes this.
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Personally I use Hetzner VM's. I install all PHP versions (as this takes the longest time) and make a snapshot, then I use the AI (when testing the AI). When testing ISPConfig itself, I try to sync the files I am changing to the test server automatically.
     
    pyte and ahrasis like this.

Share This Page