Quick Setup of Development environment: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Difference to Full Setup of Development environment ==
We have now a script at https://get.openpetra.org that helps with setting up a development environment on recent versions of CentOS, Fedora, Debian and Ubuntu. This script is also used for setting up the demo server, and to run all the nightly tests.
The full [[Setup of Development environment]] describes how to download the code from Launchpad, and how to setup an environment for someone that will get seriously involved in the development of OpenPetra.


This guide will show instead, how someone who wants to have a quick look at the project, or wants to fix that one little annoying bug, can get a basic environment with the latest code, and in a very short time.
The requirement is one of the supported Linux systems, that is not used for anything else. The recommendation is to use a dedicated virtual machine or a container just for OpenPetra.


Quick Setup:
You also need to have installed: bash, curl, sudo, tar
* uses a nightly development build
* this build includes a compiled version of OpenPetra, and the project files
* also comes with an sqlite database with demo data


Full Setup:
to start the script, simply run as root:
* requires to download the source code,  
* and then generate the whole solution,
* then generate a database, and so on


== Steps to follow ==
curl https://get.openpetra.org | bash -s devenv
=== for Windows ===
You will need these software packages:
* Microsoft .Net 4.0/4.5 Runtime, and Windows SDK (recommended) (see [[Setup_of_Development_Environment_for_Windows#Microsoft_.NET_3.5]])
* [http://www.icsharpcode.net/opensource/sd/download/#SharpDevelop4x SharpDevelop 4.x], or Visual Studio (Express) 2008, 2010 or higher
* NAnt: download and install [http://sourceforge.net/projects/openpetraorg/files/openpetraorg/Tools/NAnt-Setup-0.92.exe/download NAnt-Setup-0.92.exe]
=== for Linux ===
You will need these software packages:
* Mono
** best to use mono-openpetra packages (for CentOS, Debian/Ubuntu), from https://build.opensuse.org/project/show?project=home%3Atpokorra%3Aopenpetra
** that includes the latest version of NAnt as well
* MonoDevelop, or command line


=== download openpetra source and binary package ===
After the installation has finished successfully, you can do this:
* download the latest developers build from [https://sourceforge.net/projects/openpetraorg/files/openpetraorg/devzip-nightly/ Sourceforge]
 
* unzip
* Go and check your instance at https://localhost (it will display your specific url in the final output of the script).
* open the file \openpetra\delivery\projects\sharpdevelop4\OpenPetra.Server.sln in your favourite IDE
* Login with user DEMO and password demo, or user SYSADMIN and password CHANGEME
* On Windows, you can start the Developers Assistant which is located in the root of the unzipped openpetra directory.
* See also the API at https://localhost/api/
** this helps you to start OpenPetra server and client, and to do a full build, etc
* You find phpMyAdmin running at https://localhost/phpmyadmin
* Alternatively, you can use nant from the command line
* Start developing in /home/op_dev as user op_dev, and use the following commands:
 
cd openpetra
nant generateGlue
nant generateProjectFiles
nant quickCompile -D:onlyonce=yes
nant compileProject -D:name=Ict.Common
 
You can do a git pull, to get the latest version of branch test:
cd openpetra
git pull
# rebuild OpenPetra with the latest updates
nant quickClean generateSolution
# to recreate the database, if there have been database updates
nant recreateDatabase resetDatabase

Latest revision as of 06:28, 26 March 2020

We have now a script at https://get.openpetra.org that helps with setting up a development environment on recent versions of CentOS, Fedora, Debian and Ubuntu. This script is also used for setting up the demo server, and to run all the nightly tests.

The requirement is one of the supported Linux systems, that is not used for anything else. The recommendation is to use a dedicated virtual machine or a container just for OpenPetra.

You also need to have installed: bash, curl, sudo, tar

to start the script, simply run as root:

curl https://get.openpetra.org | bash -s devenv

After the installation has finished successfully, you can do this:

  • Go and check your instance at https://localhost (it will display your specific url in the final output of the script).
  • Login with user DEMO and password demo, or user SYSADMIN and password CHANGEME
  • See also the API at https://localhost/api/
  • You find phpMyAdmin running at https://localhost/phpmyadmin
  • Start developing in /home/op_dev as user op_dev, and use the following commands:
cd openpetra
nant generateGlue
nant generateProjectFiles
nant quickCompile -D:onlyonce=yes
nant compileProject -D:name=Ict.Common

You can do a git pull, to get the latest version of branch test:

cd openpetra
git pull
# rebuild OpenPetra with the latest updates
nant quickClean generateSolution
# to recreate the database, if there have been database updates
nant recreateDatabase resetDatabase