Please install the following things system-wide and prior to working with any of our guide:
- docker: Follow this guide or use your package manager to install it.
- node: Use this download link or use your package manager to install it.
- npm: Should be bundled along with
node
. - angular/cli: Use this link to install it.
Please ensure that if you are on Windows that you have set the git setting
core.autocrlf
tofalse
andcore.eol
tolf
!
This will give you a setup of both repositories of the main Git branches.
- Clone Cobbler:
git clone git@github.com:cobbler/cobbler.git
- Clone Cobbler Web:
git clone git@github.com:cobbler/cobbler-web.git
- Go into the
cobbler
directory and execute the following steps:- Build the Docker image:
docker build -f docker/develop/develop.dockerfile -t cobbler-dev .
- Run the built image:
docker run -it --rm --name cobbler-dev -p 80:80 -p 443:443 -v ${PWD}:/code cobbler-dev
- Execute the setup script in the running container:
./docker/develop/scripts/setup-supervisor.sh
- Let the container run in the foreground! You may want to tail the Cobbler log:
tail -f /var/log/cobbler/cobbler.log
- Build the Docker image:
- Go into the
cobbler-web
directory and follow these steps:- Run an
npm install
to install the development and runtime dependencies. - Build the TS-XMLRPC API via:
npm run build typescript-xmlrpc
- Build the Cobbler-API project via:
npm run build cobbler-api
- Serve the Cobbler frontend via:
npm run start cobbler-frontend
- Run an
- Go to http://localhost:4200 to see the frontend.
- Login is:
- Username:
cobbler
- Password:
cobbler
- Username:
When developing the Web Frontend it is needed sometimes to switch between different release codestreams. In the following, a few examples of the current codestreams can be seen:
This assumes that you are in the root folder of the backend repository.
git checkout main
docker build -f docker/develop/develop.dockerfile -t cobbler-dev .
docker run -it --rm --name cobbler-dev -p 80:80 -p 443:443 -v ${PWD}:/code cobbler-dev
make clean
./docker/develop/scripts/setup-supervisor.sh
This assumes that you are in the root folder of the backend repository.
git checkout release33
docker build -f docker/develop/develop.dockerfile -t cobbler-dev:release33 .
docker run -it --rm --name cobbler-dev -p 80:80 -p 443:443 -v ${PWD}:/code cobbler-dev:release33
make clean
./docker/develop/scripts/setup-supervisor.sh
When you are running Angular applications this is a common issue. Please check the following things:
- if the request is blocked by the browser or the server (so Cobbler).
- if the request is lacking the required headers, check the Apache webserver configuration in the Cobbler testing
container at
/etc/apache2/vhosts.d/cobbler.conf
- if the request is resulting in a 404, check the
proxy.conf.json
for the correct URL.
We will only be guiding you as a developer very limited here as this is a very environment specific setting. Most of the time will be "Here is a random Stackoverflow link, please read and debug yourself.".