mirror of
https://github.com/ceph/go-ceph
synced 2024-12-11 08:57:13 +00:00
Merge pull request #34 from ceph/ci
Ci Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
commit
2f760b2b4d
32
.travis.yml
32
.travis.yml
@ -1,30 +1,26 @@
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
language: go
|
||||
|
||||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: CEPH_RELEASE=jewel
|
||||
- env: CEPH_RELEASE=kraken
|
||||
|
||||
before_install:
|
||||
- ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
|
||||
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||
- chmod 600 ~/.ssh/authorized_keys
|
||||
- sudo pip install ceph-deploy
|
||||
- ceph-deploy install --release giant `hostname`
|
||||
- ceph-deploy pkg --install librados-dev `hostname`
|
||||
- ceph-deploy pkg --install librbd-dev `hostname`
|
||||
- ceph-deploy pkg --install libcephfs-dev `hostname`
|
||||
- sudo apt-get update
|
||||
- ci/before_install.sh
|
||||
- bash ci/micro-osd.sh /tmp/micro-ceph
|
||||
- export CEPH_CONF=/tmp/micro-ceph/ceph.conf
|
||||
- ceph status
|
||||
|
||||
script:
|
||||
- go get -t -v ./...
|
||||
- go test -v ./...
|
||||
- go fmt ./...
|
||||
|
||||
notifications:
|
||||
recipients:
|
||||
- noahwatkins@gmail.com
|
||||
email:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
- go get -t -v ./...
|
||||
- go list ./...
|
||||
- go test -v $(go list ./... | grep -v cephfs)
|
||||
- go fmt ./...
|
||||
|
27
ci/before_install.sh
Executable file
27
ci/before_install.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sudo apt-get install -y python-virtualenv
|
||||
|
||||
# ceph-deploy and ceph
|
||||
|
||||
WORKDIR=$HOME/workdir
|
||||
mkdir $WORKDIR
|
||||
pushd $WORKDIR
|
||||
|
||||
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
|
||||
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
|
||||
git clone git://github.com/ceph/ceph-deploy
|
||||
pushd ceph-deploy
|
||||
./bootstrap
|
||||
./ceph-deploy install --release ${CEPH_RELEASE} `hostname`
|
||||
./ceph-deploy pkg --install librados-dev `hostname`
|
||||
./ceph-deploy pkg --install librbd-dev `hostname`
|
||||
./ceph-deploy pkg --install libcephfs-dev `hostname`
|
||||
popd # ceph-deploy
|
||||
|
||||
popd # workdir
|
@ -42,6 +42,7 @@ auth cluster required = none
|
||||
auth service required = none
|
||||
auth client required = none
|
||||
osd pool default size = 1
|
||||
mon allow pool delete = true
|
||||
EOF
|
||||
export CEPH_ARGS="--conf ${DIR}/ceph.conf"
|
||||
|
||||
@ -100,10 +101,19 @@ ceph osd pool create cephfs_metadata 8
|
||||
ceph fs new cephfs cephfs_metadata cephfs_data
|
||||
ceph-mds -i a
|
||||
|
||||
export CEPH_CONF="${DIR}/ceph.conf"
|
||||
|
||||
while true; do
|
||||
if ceph status | tee /dev/tty | grep -q HEALTH_OK; then
|
||||
if ! ceph status | grep -q creating &> /dev/null; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# check that it works
|
||||
rados --pool rbd put group /etc/group
|
||||
rados --pool rbd get group ${DIR}/group
|
||||
diff /etc/group ${DIR}/group
|
||||
ceph osd tree
|
||||
|
||||
export CEPH_CONF="${DIR}/ceph.conf"
|
||||
|
Loading…
Reference in New Issue
Block a user