| DevOps Hacking with Clojure | Website & Blog
Compatibility
Features
Local-remote-testing
Usage Summary
Targets-config-example
Serverspec-config-example
Reference-Targets
Reference-Domain-API
Reference-Infra-API
License
dda-pallet is compatible with the following versions
The dda-serverspec-crate allows you to specify expected state for target-systems and test against their current state. dda-serverspec-crate provides tests for:
There are two modes of testing targets, either local or remote. Local tests are executed on the system the jar is running on. Local tests are executed by the current user.
Remote tests are collection state (we name it facts) from target system on compare these facts against expectation on the system executing the dda-serverspec jar.
Facts are collected via ssh & bash. Test utils, needed, can be installed by using the installation phase (use --install-dependencies
on the command line).
curl -L -o dda-serverspec-standalone.jar https://github.com/DomainDrivenArchitecture/dda-serverspec-crate/releases/download/1.2.1/dda-serverspec-standalone.jar
)serverspec.edn
(Domain-Schema for all your tests) and target.edn
(Schema for Targets to be provisioned) according to the reference and our example configurations. Please create them in the same folder where you've saved the jar-file. For more information about these files refer to the corresponding information below.java -jar dda-serverspec-standalone.jar --targets targets.edn serverspec.edn
If you want to test on your localhost you don't need a target config.
java -jar dda-serverspec-standalone.jar serverspec.edn
The configuration consists of two files defining both WHERE to test and WHAT to test.
You can download examples of these configuration files from
example-targets.edn and
example-serverspec.edn respectively.
Example content of the file, example-targets.edn
:
{:existing [{:node-name "test-vm1" ; semantic name
:node-ip "35.157.19.218"} ; the ip4 address of the machine to be provisioned
{:node-name "test-vm2"
:node-ip "18.194.113.138"}]
:provisioning-user
{:login "initial" ; account used to provision
:password {:plain "secure1234"}}} ; optional password, if no ssh key is authorized
Example content of the file, example-serverspec.edn
:
{:netstat [{:process-name "sshd" :port "11" :running? false}
{:process-name "sshd" :port "22" :ip "0.0.0.0" :exp-proto "tcp"}
{:process-name "sshd" :port "22" :ip "::" :exp-proto "tcp6"}
{:process-name "dhclient" :port "68" :ip "0.0.0.0"}]
:file [{:path "/root/.bashrc" :user "root"}
{:path "/etc"}
{:path "/absent" :exist? false}
{:path "/root/.profile" :mod "644" :user "root" :group "root"}
{:path "/etc/resolv.conf" :link-to "../run/resolvconf/resolv.conf"}]
:netcat [{:host "www.google.com" :port 80}
{:host "www.google.c" :port 80 :reachable? false}]
:package [{:name "test" :installed? false}
{:name "nano"}]
:http [{:url "https://domaindrivenarchitecture.org"
:expiration-days 15}]
:iproute [{:ip "1.1.1.1" :via "172.17.0.1"}
{:hostname "stackoverflow.com" :via "172.17.0.1"}]}
In case any problems occur, you may want to have a look at the log-file:
less logs/pallet.log
Some details about the architecture:
You can define provisioning targets using the targets-schema
You can use our conventions as a starting point: see domain reference
Or you can build your own conventions using our low level infra API. We will keep this API backward compatible whenever possible: see infra reference
Copyright © 2015, 2016, 2017, 2018 meissa GmbH Published under apache2.0 license Pls. find licenses of our subcomponents here
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close