一个分布式测试系统利器

简介: Create an EC2 instance Sign up for AWSIn Services -> EC2, click “Launch Instance”Choose the 64 bit Debian Jessie image...
+关注继续查看

Create an EC2 instance

  1. Sign up for AWS
  2. In Services -> EC2, click “Launch Instance”
  3. Choose the 64 bit Debian Jessie image
  4. Hit review and launch

Save your SSH key pair!

Install Java

SSH into your instance and open /etc/apt/sources.list in your favorite editor. Add jessie-backports to the file:

deb http://ftp.debian.org/debian jessie-backports main

Now run sudo apt-get update, and install the following!

$ sudo apt-get install openjdk-8-jre openjdk-8-jre-headless libjna-java

Use Docker

You need to install docker and docker compose. Then spin up the containers:

$ git clone https://github.com/aphyr/jepsen && cd jepsen/docker
$ ./up.sh
$ docker exec -it jepsen-control bash

Write your test

Create a new Leiningen project:

$ lein new foo && cd foo

And edit src/jepsen/foo.clj — your first test! This does nothing!

(ns jepsen.zookeeper
  (:require [jepsen.tests :as tests]))

(defn zk-test
  [version]
  tests/noop-test)

Edit test/jepsen/foo_test.clj to look like this:

(ns jepsen.foo-test
  (:require [clojure.test :refer :all]
    [jepsen.core :as jepsen]
    [jepsen.foo :as foo]))
(deftest a-test
  (is (:valid? (:results (jepsen/run! (foo/foo "3.4.5+dfsg-2"))))))

That calls the test you just wrote (and passes it a version number).

Finally! Run your test:

$ lein test

And hopefully you get something that ends with:

Everything looks good! ヽ(‘ー`)ノ


目录
相关文章
|
1月前
|
JSON 搜索推荐 前端开发
分布式系列教程(39) -分布式日志采集系统ELK
分布式系列教程(39) -分布式日志采集系统ELK
22 0
|
2月前
|
存储 安全 算法
22分布式电商项目 - 商家系统登录与安全控制
22分布式电商项目 - 商家系统登录与安全控制
18 0
|
2月前
|
安全 前端开发 JavaScript
19分布式电商项目 - 运营商系统登录与安全控制
19分布式电商项目 - 运营商系统登录与安全控制
16 0
|
3月前
|
存储 数据可视化 Java
Spring Boot中的Zipkin:分布式跟踪系统
Spring Boot中的Zipkin:分布式跟踪系统
|
4月前
|
关系型数据库 数据库 OceanBase
OceanBase是阿里巴巴自主研发的分布式关系型数据库系统
OceanBase是阿里巴巴自主研发的分布式关系型数据库系统
158 1
|
5月前
|
监控 算法
分布式和可再生系统建模(simulink)
分布式和可再生系统建模(simulink)
102 0
|
5月前
|
供应链 安全 新能源
基于主从博弈的社区综合能源系统分布式协同优化运行策略(Matlab代码实现)
基于主从博弈的社区综合能源系统分布式协同优化运行策略(Matlab代码实现)
|
5月前
|
负载均衡 决策智能
博弈论在电动车和电网系统中分布式模型预测控制研究(Matlab代码实现)
博弈论在电动车和电网系统中分布式模型预测控制研究(Matlab代码实现)
|
5月前
|
算法 安全
分布式光伏储能系统的优化配置方法(Matlab代码实现)
分布式光伏储能系统的优化配置方法(Matlab代码实现)
|
6月前
|
JSON 监控 Dubbo
基于SkyWalking的分布式跟踪系统 - 异常告警
基于SkyWalking的分布式跟踪系统 - 异常告警
170 0
热门文章
最新文章
推荐文章
更多