... | ... | @@ -76,74 +76,114 @@ Rake has been selected as it is more versatile and feature rich task definition |
|
|
|
|
|
# Building, Testing and Running Stork
|
|
|
|
|
|
There are several task provided by Rakefile for building and testing source code depending on the part of Stork.
|
|
|
There are several tasks provided by rake for building and testing source code depending on the part of Stork.
|
|
|
|
|
|
## Backend
|
|
|
|
|
|
Building whole backend:
|
|
|
```console
|
|
|
$ rake build_backend
|
|
|
```
|
|
|
|
|
|
Building the server part:
|
|
|
```console
|
|
|
$ rake build_server
|
|
|
```
|
|
|
Building the agent part:
|
|
|
```console
|
|
|
$ rake build_agent
|
|
|
```
|
|
|
|
|
|
Running unit tests:
|
|
|
```console
|
|
|
$ rake unittest_backend
|
|
|
```
|
|
|
|
|
|
This requires to have Postgres DB running. A potentially convenient alternative is to run:
|
|
|
|
|
|
```console
|
|
|
$ rake unit_test_backend_db
|
|
|
```
|
|
|
|
|
|
which will spin up a docker container with a DB and will run unit tests on it.
|
|
|
|
|
|
Static analysis:
|
|
|
```console
|
|
|
$ rake lint_go
|
|
|
```
|
|
|
|
|
|
Running agent:
|
|
|
```console
|
|
|
$ rake run_agent
|
|
|
```
|
|
|
|
|
|
Running server:
|
|
|
```console
|
|
|
$ rake run_server
|
|
|
```
|
|
|
|
|
|
## Frontend
|
|
|
|
|
|
Building:
|
|
|
```console
|
|
|
$ rake build_ui
|
|
|
```
|
|
|
|
|
|
Static analysis:
|
|
|
```console
|
|
|
$ rake lint_ui
|
|
|
```
|
|
|
|
|
|
Starting Angular development server
|
|
|
```console
|
|
|
$ rake serve_ui
|
|
|
$ rake --tasks
|
|
|
rake build # Build all Stork components (Server, Agent, Tool, UI, doc)
|
|
|
rake build:agent # Build Stork Agent from sources
|
|
|
rake build:agent_dist # Build agent distribution directory
|
|
|
rake build:agent_pkg # Build agent package
|
|
|
rake build:backend # Build Stork Backend (Server, Agent, Tool)
|
|
|
rake build:backend_live # Build Stork backend continuously whenever source files change
|
|
|
rake build:doc # Build Stork documentation from sources
|
|
|
rake build:doc_live # Builds Stork documentation continuously whenever source files change
|
|
|
rake build:server # Build Stork Server from sources
|
|
|
rake build:server_dist # Build server distribution directory
|
|
|
rake build:server_only_dist # Build server distribution directory without WebUI, doc and tool
|
|
|
rake build:server_pkg # Build server package
|
|
|
rake build:tool # Build Stork Tool from sources
|
|
|
rake build:ui # Build Web UI (production mode)
|
|
|
rake build:ui_debug # Build Stork UI (testing mode)
|
|
|
rake build:ui_live # Build Stork UI (testing mode) continuously whenever source files change
|
|
|
rake build:ui_only_dist # Build server distribution directory only with WebUI (without server, doc and tool)
|
|
|
rake check # Check all system-level dependencies
|
|
|
rake check:build # Check the external dependencies related to the build
|
|
|
rake check:codebase # Check the external dependencies related to the codebase
|
|
|
rake check:dev # Check the external dependencies related to the development
|
|
|
rake check:dist # Check the external dependencies related to the distribution
|
|
|
rake check:release # Check the external dependencies related to the distribution
|
|
|
rake check:systemtest # Check the external dependencies related to the system tests
|
|
|
rake check:utils # Check the external dependencies related to the utils
|
|
|
rake clean:hard # Clobber all generated and non-source files in a project
|
|
|
rake clean:pkgs # Clean all packages of a given kind (agent or server)
|
|
|
rake clean:soft # Clean up the project by deleting scratch files and backup files
|
|
|
rake db:migrate # Migrate (and create) database to the newest version
|
|
|
rake db:remove_remaining # Remove remaining test databases and users
|
|
|
rake db:setup_envvars # Setup the database environment variables
|
|
|
rake demo:build_ci_containers # Prepare containers that are using in GitLab CI processes
|
|
|
rake demo:check_etchosts # Checks the /etc/hosts file content
|
|
|
rake demo:down # Down all containers and remove all volumes
|
|
|
rake demo:up # Build containers with everything and start all services using docker-compose
|
|
|
rake demo:up:bind9 # Build and run container with Stork Agent and BIND 9
|
|
|
rake demo:up:dns_proxy_server # Build and run Docker DNS Proxy Server to resolve internal Docker hostnames
|
|
|
rake demo:up:kea # Build and run container with Stork Agent and Kea
|
|
|
rake demo:up:kea6 # Build and run container with Stork Agent and Kea DHCPv6 server
|
|
|
rake demo:up:kea_ha # Build and run two containers with Stork Agent and Kea HA pair
|
|
|
rake demo:up:kea_many_subnets # Build and run container with Stork Agent and Kea with many subnets in the configuration
|
|
|
rake demo:up:kea_premium # Build and run container with Stork Agent and Kea with host reseverations in db
|
|
|
rake demo:up:postgres # Build and run container with Postgres
|
|
|
rake demo:up:simulator # Build and run container with simulator
|
|
|
rake fmt:backend # Format backend source code
|
|
|
rake fmt:ui # Make frontend source code prettier
|
|
|
rake install:agent # Install agent
|
|
|
rake install:server # Install server
|
|
|
rake lint:backend # Check backend source code
|
|
|
rake lint:git # Run danger commit linter
|
|
|
rake lint:ui # Check frontend source code
|
|
|
rake prepare # Install all system-level dependencies
|
|
|
rake prepare:backend_deps # Trigger the backend (GO) dependencies installation
|
|
|
rake prepare:build # Install the external dependencies related to the build
|
|
|
rake prepare:codebase # Install the external dependencies related to the codebase
|
|
|
rake prepare:deps # Trigger the frontend (UI) and backend (GO) dependencies installation
|
|
|
rake prepare:dev # Install the external dependencies related to the development
|
|
|
rake prepare:dist # Install the external dependencies related to the distribution
|
|
|
rake prepare:systemtest # Install the external dependencies related to the system tests
|
|
|
rake prepare:ui_deps # Trigger the frontend (UI) dependencies installation
|
|
|
rake prepare:utils # Install the external dependencies related to the codebase
|
|
|
rake rebuild:agent # Rebuild Stork Agent from sources
|
|
|
rake rebuild:agent_pkg # Rebuild agent package
|
|
|
rake rebuild:doc # Rebuild Stork documentation from sources
|
|
|
rake rebuild:server # Rebuild Stork Server from sources
|
|
|
rake rebuild:server_pkg # Rebuild server package
|
|
|
rake rebuild:tool # Rebuild Stork Tool from sources
|
|
|
rake rebuild:ui # Rebuild Web UI (production mode)
|
|
|
rake release:bump # Generic task for bumping up version
|
|
|
rake release:bump:major # Bump up major version
|
|
|
rake release:bump:minor # Bump up minor version
|
|
|
rake release:bump:patch # Bump up patch version
|
|
|
rake release:tarball # Prepare release tarball with Stork sources
|
|
|
rake run:agent # Run Stork Agent (release mode)
|
|
|
rake run:agent_debug # Run Stork Agent (debug mode)
|
|
|
rake run:server # Run Stork Server (release mode)
|
|
|
rake run:server_db # Run local server with Docker database
|
|
|
rake run:server_debug # Run Stork Server (debug mode, no doc and UI)
|
|
|
rake run:sim # Run simulator
|
|
|
rake systemtest # Run system tests
|
|
|
rake systemtest:build # Build the containers used in the system tests
|
|
|
rake systemtest:down # Down all running services, removes networks and volumes
|
|
|
rake systemtest:gen # Create autogenerated configs
|
|
|
rake systemtest:list # List the test cases
|
|
|
rake systemtest:logs # Display docker-compose logs
|
|
|
rake systemtest:perfdhcp # Run perfdhcp docker-compose service
|
|
|
rake systemtest:regen # Recreate autogenerated configs
|
|
|
rake systemtest:sh # Run system tests docker-compose
|
|
|
rake systemtest:shell # Run shell in the docker-compose container
|
|
|
rake unittest:backend # Run backend unit and coverage tests
|
|
|
rake unittest:backend_cov # Show backend coverage of unit tests in web browser
|
|
|
rake unittest:backend_db # Run local unit tests with Docker database
|
|
|
rake unittest:backend_debug # Run backend unit tests (debug mode)
|
|
|
rake unittest:ui # Run unit tests for UI
|
|
|
rake utils:connect_dbg # Connect gdlv GUI Go debugger to waiting dlv debugger
|
|
|
rake utils:ctags # Generate ctags for Emacs
|
|
|
rake utils:print_pkg_type # Check package type of current OS
|
|
|
```
|
|
|
|
|
|
## Demo
|
|
|
|
|
|
Building and running demo:
|
|
|
```console
|
|
|
$ rake docker_up
|
|
|
$ rake demo:up
|
|
|
```
|
|
|
|
|
|
and now visit in a web browser: http://localhost:8080/
|
... | ... | |