Search code examples
dockercontinuous-integrationautomated-testssandbox

Setting up a testing environment for external developer


Context : Setup up texting environment for external programme developers to be later integrated into own platform.

May I know whats the main difference between a sandbox and a dev server use for testing.

If lets say you uses java,jsp,html,css,js,mysql for your application, but you are also using external developers to develop using those same languages and db , which later is to be integrated to be on the same platform as current existing other applications.

So questions is sandbox is use mainly for separating an application from the rest of the environment, so if the projects has files on filesystem, sandbox need to separate, filesystem, database. sandbox and dev server probably will have the filesystem to allow external developer to access it. So does that leave us with docker option? But if lets say the entire application is done on docker, then can it be linked to live server?

Also how bout the CI/CD pipeline? How do we test given the selected options available? Which option is the most suitable in your opinion?


Solution

  • How about Vagrant

    Its's really nice tool for separate dev environment. Shared storage can bu used for everything You need - DBs, filesystems. Local network for every machine is separated. All environment configuration take place in one file (example Vagrantfile), so setup for new developer it's just:

    mkdir dev2 && cd dev2 && cp dev1/Vagrantfile . && vagrant up 
    

    Of course You can use CM tools like Ansible or Puppet, for install software like webserver, DB server and make OS changes like create users, dirs. It's easy way to keep all devs environment in the same condition. In case of unexpected developer mistakes like broken some configuration or rm -rf /home/* it's only recreate a machine which take a few minutes. About CI/CD testing, I like simple solutions. In Jenkins Pipeline

    checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: repoWithTests]], branches: [[name: 'master']]], poll: false
    sh(script: "python tests.py", returnStdout: true)
    

    Fie tests.py it's simple scripts with unittest.TestCase for checking enpoints, grep logs, and whatever it could need.

    Summarizing in my opinion Vagrant it's better way to simulate real machine than docker. Docker is best for separate one application, not whole machine.