forked from supermy/mytools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
145 additions
and
266 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM jamesmo/debian:7 | ||
|
||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | ||
RUN groupadd -r redis && useradd -r -g redis redis | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# grab gosu for easy step-down from root | ||
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 | ||
RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ | ||
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ | ||
&& gpg --verify /usr/local/bin/gosu.asc \ | ||
&& rm /usr/local/bin/gosu.asc \ | ||
&& chmod +x /usr/local/bin/gosu | ||
|
||
ENV REDIS_VERSION 3.0.0 | ||
ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-3.0.0.tar.gz | ||
ENV REDIS_DOWNLOAD_SHA1 c75fd32900187a7c9f9d07c412ea3b3315691c65 | ||
|
||
# for redis-sentinel see: http://redis.io/topics/sentinel | ||
RUN buildDeps='gcc libc6-dev make'; \ | ||
set -x \ | ||
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /usr/src/redis \ | ||
&& curl -sSL "$REDIS_DOWNLOAD_URL" -o redis.tar.gz \ | ||
&& echo "$REDIS_DOWNLOAD_SHA1 *redis.tar.gz" | sha1sum -c - \ | ||
&& tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \ | ||
&& rm redis.tar.gz \ | ||
&& make -C /usr/src/redis \ | ||
&& make -C /usr/src/redis install \ | ||
&& rm -r /usr/src/redis \ | ||
&& apt-get purge -y --auto-remove $buildDeps | ||
|
||
RUN mkdir /data && chown redis:redis /data | ||
VOLUME /data | ||
WORKDIR /data | ||
|
||
COPY docker-entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
EXPOSE 6379 | ||
CMD [ "redis-server" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
myredis: | ||
image: redis:latest | ||
ports: | ||
- "6379:6379" | ||
|
||
#export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/" | ||
#build spring app use jdk1.7 | ||
#spring app 源代码 :https://github.com/supermy/gs-messaging-redis |
Binary file renamed
BIN
+6.11 MB
...redis/spring/gs-messaging-redis-0.1.0.jar → common/myredis/gs-messaging-redis-0.1.0.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fig up -d && fig ps | ||
java -jar gs-messaging-redis-0.1.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
详见 /common/mycloud 与 /common/mystorm/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printjson(1); | ||
config={_id: 'rs1', members:[{_id: 0,host:'172.17.0.69:27017'},{_id:1,host:'172.17.0.65:27017'},{_id:2,host:'172.17.0.67:27017'}]} | ||
rs.initiate(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printjson(1); | ||
config={_id: 'rs1', members:[{_id: 0,host:'172.17.0.69:27017'},{_id:1,host:'172.17.0.65:27017'},{_id:2,host:'rs13:27017'}]} | ||
rs.initiate(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printjson(1); | ||
config={_id: 'rs2', members:[{_id: 0,host:'172.17.0.59:27017'},{_id:1,host:'172.17.0.61:27017'},{_id:2,host:'172.17.0.63:27017'}]} | ||
rs.initiate(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printjson(1); | ||
config={_id: 'rs1', members:[{_id: 0,host:'172.17.0.59:27017'},{_id:1,host:'172.17.0.61:27017'},{_id:2,host:'172.17.0.63:27017'}]} | ||
rs.initiate(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
printjson(1); | ||
sh.addShard("rs1/172.17.0.69:27017"); | ||
sh.addShard("rs2/172.17.0.59:27017"); | ||
sh.status(); | ||
|
||
db.runCommand( { listshards : 1 } ); | ||
db.runCommand( { enablesharding:"test" }); | ||
db.runCommand( { shardcollection : "test.c1",key : {id: 1} } ); | ||
|
||
db = db.getSiblingDB("test"); | ||
for(var i=1;i<=2000;i++) db.c1.save({id:i,value1:"12345678"}); | ||
db.c1.stats(); | ||
|
||
db.runCommand( { enablesharding:"gndata" }); | ||
db.runCommand( { shardcollection : "gndata.tellog",key : {_id: 1} } ); | ||
|
||
|
||
// | ||
//#创建用户 | ||
//db = db.getSiblingDB("admin"); | ||
//db.createUser( { | ||
// user: "user1", | ||
// pwd: "111111", | ||
// roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] | ||
//}); | ||
//db.createUser( { | ||
// user: "root1", | ||
// pwd: "111111", | ||
// roles: [ { role: "root", db: "admin" } ] | ||
//}); |
Oops, something went wrong.