Software Delivery Machine for Axon projects
The SDM framework enables you to control your delivery process in code. Think of it as an API for your software delivery. See this introduction for more information on the concept of a Software Delivery Machine and how to create and develop on an SDM.
Axon is an end-to-end development and infrastructure platform for smoothly evolving Event-Driven microservices focused on CQRS and Event Sourcing.
This SDM is build on top of the official Atomist Spring Boot SDM, it can:
When you run this SDM in local mode, it operates in the privacy of your laptop.
~/atomist/projects/<owner>/axon-sdm
Note: <owner>
is your Github owner, e.g: idugalic
$ npm install -g @atomist/cli
Note: Make sure that you have
node
andnpm
available.
Install the project dependencies using NPM, compile the TypeScript, and start your SDM in local mode:
$ cd ~/atomist/projects/<owner>/axon-sdm
$ atomist start --local
In order to see messages from events (not interspersed with logs), activate a message listener in another terminal:
atomist feed
List all skills
(commands that you can use to transfrom your project) of the SDM:
$ atomist s
$ atomist create axon-java-spring
Creates new project under ~/atomist/projects/<owner>/
folder by using https://github.com/idugalic/axon-java-spring-maven-seed
as a seed.
Newly created project is an Axon application written in Java that uses Axon Server
$ atomist create axon-java-spring-with-structure
Creates new project under ~/atomist/projects/<owner>/
folder by using https://github.com/idugalic/axon-java-spring-maven-seed/tree/with-structure
(branch with-structure
) as a seed.
Newly created project is an Axon application written in Java that uses Axon Server.
Basic package structure is included (command, query, api, …).
Architecture test included. It checks if the classes incommand
andquery
packages are package private. This enables loose coupling and high cohesion.
$ atomist create axon-kotlin-spring
Creates new project under ~/atomist/projects/<owner>/
folder by using https://github.com/idugalic/axon-kotlin-spring-maven-seed
as a seed.
Newly created project is an Axon application written in Kotlin that uses Axon Server
$ atomist create axon-kotlin-spring-with-structure
Creates new project under ~/atomist/projects/<owner>/
folder by using https://github.com/idugalic/axon-kotlin-spring-maven-seed/tree/with-structure
(branch with-structure
) as a seed.
Newly created project is an Axon application written in Kotlin that uses Axon Server
Basic package structure is included (command, query, api, …).
Architecture test included. It checks if the classes incommand
andquery
packages are acessible from this pages only. This enables loose coupling and high cohesion.
$ atomist set axon-version
Sets all maven Axon dependencies with the group (org.axonframework
) to a new desired version.
The change will be introduced within specific branch axon-upgrade-<new-version>
.
$ atomist exclude axon-server-connector
Excludes transitive maven Axon dependency axon-server-connector
from axon-spring-boot-starter
.
The change will be introduced within specific branch exclude-axon-server-connector
.
$ atomist add amqp
Adds maven dependencies required for Spring Boot AMQP integration: axon-amqp-spring-boot-starter
and spring-boot-starter-amqp
The change will be introduced within specific branch add-amqp-dependencies
.
$ atomist set serializer
Sets desired Serializer for Axon Spring Boot project. Possible values are default
, xstream
, java
, and jackson
The change will be introduced within specific branch set-serializer-<desired serializer>
.
This SDM is built on top of the Spring SDM, so you can use other code transfroms that are available by Spring SDM:
$ atomist try to upgrade Spring Boot
$ atomist add Maven dependency
$ atomist add spring boot starter
$ atomist add spring boot actuator
$ atomist list branch deploys
In team mode, your SDM connects to the Atomist service.
You can run Software Delivery Machines (SDMs) in many different environments, ranging from your laptop or data center to Platform-as-a-Service offerings like Heroku and Pivotal Cloud Foundry.
Atomist also supports running SDMs as Docker containers. This allows you to operate them in Kubernetes clusters or Google Container Engine, for example.
This document explains various ways to run SDMs.
With the Dockerfile
in place, you can start the Docker build:
$ npm run build
$ docker build . -t idugalic/axon-sdm
Running the Docker container locally:
$ docker run -d -e ATOMIST_CONFIG='{"workspaceIds": ["YOUR_WORSPACE_IDs"],"apiKey":"YOUR_API_KEY","sdm": {"cloudfoundry": {"api": "https://api.run.pivotal.io","user": "idugalic@gmail.com","password": "YOUR_PWS_PASSWORD","org": "axoniq","spaces": {"staging": "staging","production": "production"}}}}' --name my-axon-sdm idugalic/axon-sdm
In Docker, the SDM will only run in team mode.
On the web interface, you can find the Workspace ID on the settings page (click the gear), and your API Key by clicking on your username in the upper right.
$ docker push idugalic/axon-sdm
You can deploy docker image to cloudfoundry (make sure your manifest.yml has correct API Key, workspace Ids, and PWS credentials):
$ cf push axon-sdm --docker-image idugalic/axon-sdm -m 1024M -k 2048M
You can debug your SDM on your laptop.
Instead of atomist start
at the command line, start it up in a debugger. In VSCode, the debug configuration looks like:
{
"type": "node",
"request": "launch",
"name": "Launch SDM",
"program": "${workspaceFolder}/node_modules/@atomist/automation-client/bin/start.js",
"env": {
"ATOMIST_MODE": ""
},
}
If you want the SDM to run in local mode, put “local” in the ATOMIST_MODE environment variable (eg. "ATOMIST_MODE": "local"
).