goss 是一个简单、快捷的服务器测试检验工具,dgoss 是一个包装能够支持基于容器的开发模式
同时能够暴露测试结果为一个http endpoint,比较方便。linux
使用数据卷的模式nginx
docker run --name goss aelsabbahy/goss goss docker run --rm -it --volumes-from goss --name weby nginx docker exec weby /goss/goss autoadd nginx
mac 操做系统git
# Install dgoss curl -L https://raw.githubusercontent.com/aelsabbahy/goss/master/extras/dgoss/dgoss -o /usr/local/bin/dgoss chmod +rx /usr/local/bin/dgoss # Download goss to your preferred location curl -L https://github.com/aelsabbahy/goss/releases/download/v0.3.6/goss-linux-amd64 -o ~/Downloads/goss-linux-amd64 # Set your GOSS_PATH to the above location export GOSS_PATH=~/Downloads/goss-linux-amd64
goss.yaml port: tcp:22: listening: true ip: - 0.0.0.0 tcp6:22: listening: true ip: - '::' service: sshd: enabled: true running: true user: sshd: exists: true uid: 74 gid: 74 groups: - sshd home: /var/empty/sshd shell: /sbin/nologin group: sshd: exists: true gid: 74 process: sshd: running: true dgoss 运行测试: dgoss run -e JENKINS_OPTS="--httpPort=8080 --httpsPort=-1" -e JAVA_OPTS="-Xmx1048m" jenkins:alpine
确定是失败的,由于就没有一些服务github
使用这样的工具能够方便的帮助咱们进行服务器环境的确认,以及健康检查,能够加入咱们的持续集成的工具箱中。web
https://github.com/aelsabbahy/goss
https://github.com/aelsabbahy/goss/tree/master/extras/dgoss
https://github.com/aelsabbahy/goss-dockerdocker