ceph / cn-core Goto Github PK
View Code? Open in Web Editor NEWBootstrap Ceph AIO - source of cn project
License: Apache License 2.0
Bootstrap Ceph AIO - source of cn project
License: Apache License 2.0
The idea is to be able to expend from one to many. Meaning that under the hood we have to configure the rgw replication. As a result you will have multiple gateways running configured to replicate in an active-active fashion.
See: https://gist.github.com/robbat2/ec0a66eed28e5f0e1ef7018e9c77910c#rgw-zonegroup-configuration
We need to add $(hostname)
and localhost
to that list.
This means removing the rgw_dns_name
entry from the ceph.conf
I believe.
We need to bind the mon port on 3300 and enable msgr2 in the mon_host section.
The goal is to remove the ceph.conf.
Instead, pass all the required flag in the CLI.
Change https://github.com/ceph/cn-core/blob/master/cmd/init_mon.go#L72 to "beast".
We need a similar behavior than https://github.com/ceph/ceph-container/blob/master/src/daemon/docker_exec.sh. If a process fails or partially some daemon fail we need to be able to keep the container alive.
When I recently tried, the dashboard wasn't able to load correctly the buckets etc, I believe there is an issue in https://github.com/ceph/cn-core/blob/master/cmd/utils.go#L173
Implement this ceph/ceph-container#1283.
Upon bootstrapping ceph via cn-core in a containerized environment with 512MB RAM, cn-core throws an error stating 'init: run me with at least 512mb of ram' and fails.
Convert this:
function bootstrap_osd {
if [[ -n "$OSD_DEVICE" ]]; then
if [[ -b "$OSD_DEVICE" ]]; then
if [ -n "$BLUESTORE_BLOCK_SIZE" ]; then
size=$(parse_size "$BLUESTORE_BLOCK_SIZE")
if ! grep -qE "bluestore_block_size = $size" /etc/ceph/"${CLUSTER}".conf; then
echo "bluestore_block_size = $size" >> /etc/ceph/"${CLUSTER}".conf
fi
fi
else
log "Invalid $OSD_DEVICE, only block device is supported"
exit 1
fi
fi
if [ ! -e "$OSD_PATH"/keyring ]; then
if ! grep -qE "osd data = $OSD_PATH" /etc/ceph/"${CLUSTER}".conf; then
echo "osd data = $OSD_PATH" >> /etc/ceph/"${CLUSTER}".conf
echo "osd objectstore = bluestore" >> /etc/ceph/"${CLUSTER}".conf
fi
# bootstrap OSD
mkdir -p "$OSD_PATH"
chown --verbose -R ceph. "$OSD_PATH"
# if $OSD_DEVICE exists we deploy with ceph-volume
if [[ -n "$OSD_DEVICE" ]]; then
ceph-volume lvm prepare --data "$OSD_DEVICE"
else
# we go for a 'manual' bootstrap
ceph "${CLI_OPTS[@]}" auth get-or-create osd."$OSD_ID" mon 'allow profile osd' osd 'allow *' mgr 'allow profile osd' -o "$OSD_PATH"/keyring
ceph-osd --conf /etc/ceph/"${CLUSTER}".conf --osd-data "$OSD_PATH" --mkfs -i "$OSD_ID"
fi
fi
# activate OSD
if [[ -n "$OSD_DEVICE" ]]; then
OSD_FSID="$(ceph-volume lvm list --format json | python -c "import sys, json; print(json.load(sys.stdin)[\"$OSD_ID\"][0][\"tags\"][\"ceph.osd_fsid\"])")"
ceph-volume lvm activate --no-systemd --bluestore "${OSD_ID}" "${OSD_FSID}"
fi
When OSD_DEVICE
exists then run ceph-volume
.
ceph 40 0.5 0.1 571984 125820 ? Ssl 13:52 1:06 ceph-mon --setuser ceph --setgroup ceph -i ceph-nano-coree-faa32aebf00b --mon-data /var/lib/ceph/mon/ceph-ceph-nano-coree-faa32aebf00b --public-addr 127.0.0.1:3300
ceph 144 0.7 0.2 753936 149424 ? Ssl 13:52 1:23 ceph-mgr --setuser ceph --setgroup -i ceph-nano-coree-faa32aebf00b
ceph 349 0.3 0.1 850272 69172 ? Ssl 13:52 0:38 ceph-osd --setuser ceph --setgroup -i 0
mgr and osd are incorrect as they don't have the --setgroup
flag set.
Also the osd mkfs does not have these flags.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.