rename rookd to rook
This commit is contained in:
1 parent
3ddae03670
commit
bc02e76f2d
46 files changed
+76
-75
No files matched your search
@@ -305,10 +305,10 @@ osd crush update on start = false
|
||||
osd pool default size = 2
|
||||
```
|
||||
|
||||
With our ceph.conf file created we pass the settings to `rookd` with the
|
||||
With our ceph.conf file created we pass the settings to `rook` with the
|
||||
`--ceph-config-override` argument, for example:
|
||||
```bash
|
||||
rookd --ceph-config-override=ceph.conf --data-devices=sdf
|
||||
rook --ceph-config-override=ceph.conf --data-devices=sdf
|
||||
```
|
||||
|
||||
### Kubernetes
|
||||
|
||||
@@ -10,7 +10,7 @@ Settings can be specified at the global level to apply to the cluster as a whole
|
||||
- `namespace`: The Kubernetes namespace that will be created for the Rook cluster. The services, pods, and other resources created by the operator will be added to this namespace. The common scenario is to create a single Rook cluster. If multiple clusters are created, they must not have conflicting devices or host paths.
|
||||
|
||||
### Cluster settings
|
||||
- `versionTag`: The version (tag) of the `quay.io/rook/rookd` container that will be deployed. Upgrades are not yet supported if this setting is updated for an existing cluster, but upgrades will be coming.
|
||||
- `versionTag`: The version (tag) of the `quay.io/rook/rook` container that will be deployed. Upgrades are not yet supported if this setting is updated for an existing cluster, but upgrades will be coming.
|
||||
- `dataDirHostPath`: The host path where config and data should be stored for each of the services. If the directory does not exist, it will be created. Because this directory persists on the host, it will remain after pods are deleted. Therefore, for test scenarios, the path must be deleted if you are going to delete a cluster and start a new cluster on the same hosts. More details can be found in the Kubernetes [host path docs](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
|
||||
If this value is empty, each pod will get an ephemeral directory to store their config files that is tied to the lifetime of the pod running on that node. More details can be found in the Kubernetes [empty dir docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir).
|
||||
- `placement`: [placement configuration settings](#placement-configuration-settings)
|
||||
|
||||
@@ -97,8 +97,8 @@ The operator will monitor the storage daemons to ensure the cluster is healthy.
|
||||
other adjustments are made as the cluster grows or shrinks. The operator will also watch for desired state changes
|
||||
requested by the api service and apply the changes.
|
||||
|
||||
The Rook daemons (Mons, OSDs, MGR, RGW, and MDS) are compiled to a single binary `rookd`, and included in a minimal container.
|
||||
The `rookd` container includes Ceph daemons and tools to manage and store all data -- there are no changes to the data path.
|
||||
The Rook daemons (Mons, OSDs, MGR, RGW, and MDS) are compiled to a single binary `rook`, and included in a minimal container.
|
||||
The `rook` container includes Ceph daemons and tools to manage and store all data -- there are no changes to the data path.
|
||||
Rook does not attempt to maintain full fidelity with Ceph. Many of the Ceph concepts like placement groups and crush maps
|
||||
are hidden so you don't have to worry about them. Instead Rook creates a much simplified UX for admins that is in terms
|
||||
of physical resources, pools, volumes, filesystems, and buckets.
|
||||
|
||||
@@ -11,7 +11,7 @@ Rook can be deployed as a standalone service directly on any modern Linux host b
|
||||
|
||||
1. Start a one-node Rook cluster
|
||||
```bash
|
||||
docker run -it --net=host quay.io/rook/rookd:master-latest
|
||||
docker run -it --net=host quay.io/rook/rook:master-latest
|
||||
```
|
||||
|
||||
2. Download the latest `rookctl` binary
|
||||
@@ -30,7 +30,7 @@ At this point, you can use the `rookctl` tool along with some [simple steps to c
|
||||
|
||||
## Vagrant
|
||||
|
||||
Rook is also easy to run in virutal machines with `vagrant` using the standalone [Vagrantfile](/demo/standalone/Vagrantfile). When instructed, `vagrant` will start up CoreOS virtual machines and launch `rookd` via `rkt`. Note that you can make configuration changes as desired in the provided [cloud config file](/demo/standalone/cloud-config.yml.in).
|
||||
Rook is also easy to run in virutal machines with `vagrant` using the standalone [Vagrantfile](/demo/standalone/Vagrantfile). When instructed, `vagrant` will start up CoreOS virtual machines and launch `rook` via `rkt`. Note that you can make configuration changes as desired in the provided [cloud config file](/demo/standalone/cloud-config.yml.in).
|
||||
|
||||
```
|
||||
cd demo/standalone
|
||||
@@ -67,10 +67,10 @@ engine based on Etcd that is activated when not running in Kubernetes.
|
||||
|
||||

|
||||
|
||||
The Rook daemon `rookd` is a Docker container that has all that is needed to bootstrap, scale
|
||||
The Rook daemon `rook` is a Docker container that has all that is needed to bootstrap, scale
|
||||
and manage a storage cluster. Each machine in the cluster must run the Rook daemon.
|
||||
|
||||
`rookd` embeds Etcd to store configuration and coordinate cluster-wide management operations. `rookd` will automatically
|
||||
`rook` embeds Etcd to store configuration and coordinate cluster-wide management operations. `rook` will automatically
|
||||
bootstrap Etcd, manage it, and scale it as the cluster grows. It's also possible to use an external Etcd instead of the embedded one
|
||||
if needed.
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ PLATFORMS ?= $(SERVER_PLATFORMS) $(CLIENT_PLATFORMS)
|
||||
CLIENT_PACKAGES = $(GO_PROJECT)/cmd/rookctl
|
||||
|
||||
# server projects that we build on server platforms
|
||||
SERVER_PACKAGES = $(GO_PROJECT)/cmd/rookd
|
||||
SERVER_PACKAGES = $(GO_PROJECT)/cmd/rook
|
||||
|
||||
# the root go project
|
||||
GO_PROJECT=github.com/rook/rook
|
||||
|
||||
@@ -15,13 +15,14 @@ The latest upstream contains the following changes since v0.4:
|
||||
|
||||
### Tools
|
||||
- The client binary `rook` was renamed to `rookctl`
|
||||
- The damemon binary was renamed from `rookd` to `rook`
|
||||
- The `rook-client` container is no longer built. Run the [toolbox container](https://github.com/rook/rook/blob/master/Documentation/toolbox.md) for access to the `rookctl` tool.
|
||||
- `amd64`, `arm`, and `arm64` supported by the toolbox in addition to the daemons
|
||||
|
||||
### rookd Container
|
||||
### rook Container
|
||||
- Based on Ubuntu instead of Alpine Linux
|
||||
- Ceph tools are included
|
||||
- No more embedded ceph (or any cgo) in the `rookd` binary
|
||||
- No more embedded ceph (or any cgo) in the `rook` binary
|
||||
- Rook daemons shell out to the Ceph tools for all configuration
|
||||
|
||||
### Build
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ Jenkins would build the tagged release and publish its artifacts like any other
|
||||
|
||||
Each build from master has the following release artifacts:
|
||||
- binaries (rookctl) including debug symbols
|
||||
- containers (rookd, toolbox)
|
||||
- containers (rook, toolbox)
|
||||
|
||||
Binaries go to an S3 bucket `rook-release` and have the following layout:
|
||||
|
||||
@@ -60,7 +60,7 @@ Binaries go to an S3 bucket `rook-release` and have the following layout:
|
||||
Containers go to quay.io where we have the following repos:
|
||||
|
||||
```
|
||||
rook/rookd
|
||||
rook/rook
|
||||
rook/toolbox
|
||||
```
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ build() {
|
||||
|
||||
[[ ${os} == "linux" ]] || return 0
|
||||
|
||||
build_image $os $arch rookd
|
||||
build_image $os $arch rook
|
||||
build_image $os $arch toolbox
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ publish() {
|
||||
|
||||
[[ ${os} == "linux" ]] || return 0
|
||||
|
||||
publish_image $os $arch rookd
|
||||
publish_image $os $arch rook
|
||||
publish_image $os $arch toolbox
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ promote() {
|
||||
|
||||
[[ ${os} == "linux" ]] || return 0
|
||||
|
||||
promote_image $os $arch rookd
|
||||
promote_image $os $arch rook
|
||||
promote_image $os $arch toolbox
|
||||
|
||||
}
|
||||
@@ -132,7 +132,7 @@ cleanup() {
|
||||
|
||||
[[ ${os} == "linux" ]] || return 0
|
||||
|
||||
cleanup_image $os $arch rookd
|
||||
cleanup_image $os $arch rook
|
||||
cleanup_image $os $arch toolbox
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
@@ -42,8 +42,8 @@ import (
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "rookd",
|
||||
Short: "rookd tool for bootstrapping and running rook storage",
|
||||
Use: "rook",
|
||||
Short: "rook tool for bootstrapping and running rook storage",
|
||||
Long: `
|
||||
Tool for bootstrapping and running the rook storage daemon.
|
||||
https://github.com/rook/rook`,
|
||||
@@ -52,7 +52,7 @@ var cfg = &config{}
|
||||
var clusterInfo mon.ClusterInfo
|
||||
|
||||
var logLevelRaw string
|
||||
var logger = capnslog.NewPackageLogger("github.com/rook/rook", "rookd")
|
||||
var logger = capnslog.NewPackageLogger("github.com/rook/rook", "rook")
|
||||
|
||||
type config struct {
|
||||
nodeID string
|
||||
@@ -75,7 +75,7 @@ func main() {
|
||||
addCommands()
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Printf("rookd error: %+v\n", err)
|
||||
fmt.Printf("rook error: %+v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -26,9 +26,9 @@ import (
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of rookd",
|
||||
Short: "Print the version number of rook",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("rookd: %s\n", version.Version)
|
||||
fmt.Printf(" rook: %s\n", version.Version)
|
||||
fmt.Printf(" etcd: %s\n", etcdversion.Version)
|
||||
fmt.Printf("cephd: %v\n", cephVersion())
|
||||
return nil
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of rookd",
|
||||
Short: "Print the version number of rook",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("rook: %v\n", version.Version)
|
||||
return nil
|
||||
|
||||
@@ -78,7 +78,7 @@ The following tables lists the configurable parameters of the rook-operator char
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------|--------------------------------------|----------------------|
|
||||
| `image.repository` | Image | `quay.io/rook/rookd` |
|
||||
| `image.repository` | Image | `quay.io/rook/rook` |
|
||||
| `image.tag` | Image tag | `master-latest` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `rbacEnable` | If true, create & use RBAC resources | `true` |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
image:
|
||||
prefix: quay.io/rook
|
||||
repository: quay.io/rook/rookd
|
||||
repository: quay.io/rook/rook
|
||||
tag: master-latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: rook-operator
|
||||
image: quay.io/rook/rookd:master-latest
|
||||
image: quay.io/rook/rook:master-latest
|
||||
args: ["operator"]
|
||||
env:
|
||||
- name: ROOKD_REPO_PREFIX
|
||||
|
||||
@@ -100,7 +100,7 @@ spec:
|
||||
serviceAccountName: rook-operator
|
||||
containers:
|
||||
- name: rook-operator
|
||||
image: quay.io/rook/rookd:master-latest
|
||||
image: quay.io/rook/rook:master-latest
|
||||
args: ["operator"]
|
||||
env:
|
||||
- name: ROOKD_REPO_PREFIX
|
||||
|
||||
Vendored
+2
-2
@@ -35,10 +35,10 @@ if ENV["START_LOCAL_ROOKD"] == "1"
|
||||
end
|
||||
|
||||
if private_build
|
||||
aci_location = "/release/quay.io-rook-rookd-dev.aci"
|
||||
aci_location = "/release/quay.io-rook-rook-dev.aci"
|
||||
aci_options = "--insecure-options=image"
|
||||
else
|
||||
aci_location = "quay.io/rook/rookd:master-latest"
|
||||
aci_location = "quay.io/rook/rook:master-latest"
|
||||
aci_options = ""
|
||||
end
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ rm -fr /tmp/rook-discovery-url
|
||||
# clean the rook data dir
|
||||
rm -fr /tmp/rook >/dev/null 2>&1
|
||||
|
||||
# ensure rookd processes are dead if there was a crash
|
||||
ps aux | grep rookd | grep -E -v 'grep|clean-rookd' | awk '{print $2}' | xargs kill >/dev/null 2>&1
|
||||
# ensure rook processes are dead if there was a crash
|
||||
ps aux | grep rook | grep -E -v 'grep|clean-rook' | awk '{print $2}' | xargs kill >/dev/null 2>&1
|
||||
|
||||
# clear the data partitions
|
||||
for DEV in sdb sdc sdd; do
|
||||
@@ -4,7 +4,7 @@ coreos:
|
||||
update:
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: rookd.service
|
||||
- name: rook.service
|
||||
enable: true
|
||||
command: start
|
||||
drop-ins:
|
||||
|
||||
@@ -46,9 +46,9 @@ const (
|
||||
k8sFalsePostiveSuccessErrorMsg = "exit status 1" //When kubectl drain is executed, exit status 1 is always returned in stdout
|
||||
rookDindK8sClusterScriptv1_5 = "rook-dind-cluster-v1.5.sh"
|
||||
rookDindK8sClusterScriptv1_6 = "rook-dind-cluster-v1.6.sh"
|
||||
rookOperatorImagePodSpecTag = "quay.io/rook/rookd:master-latest"
|
||||
rookOperatorImagePodSpecTag = "quay.io/rook/rook:master-latest"
|
||||
rookToolsImagePodSpecTag = "quay.io/rook/toolbox:master-latest"
|
||||
rookOperatorPrefix = "quay.io/rook/rookd"
|
||||
rookOperatorPrefix = "quay.io/rook/rook"
|
||||
rookToolboxPrefix = "quay.io/rook/toolbox"
|
||||
rookOperatorCreatedTpr = "cluster.rook.io"
|
||||
masterContinerName = "kube-master"
|
||||
|
||||
@@ -132,7 +132,7 @@ rook_infra::cleanup() {
|
||||
{ #try
|
||||
|
||||
rook_infra::create
|
||||
rook_infra::try_copy_docker_image_to_rook_infra quay.io/rook/rookd:${tag_name}
|
||||
rook_infra::try_copy_docker_image_to_rook_infra quay.io/rook/rook:${tag_name}
|
||||
rook_infra::try_copy_docker_image_to_rook_infra quay.io/rook/toolbox:${tag_name}
|
||||
rook_infra::init
|
||||
|
||||
|
||||
+4
-4
@@ -36,13 +36,13 @@ cross.%: base.$(GOHOSTARCH)
|
||||
cross-gnu.%: base.%
|
||||
@$(MAKE) -C cross-gnu GOARCH=$*
|
||||
|
||||
rookd.%: ceph.% base.%
|
||||
@$(MAKE) -C rookd GOARCH=$*
|
||||
rook.%: ceph.% base.%
|
||||
@$(MAKE) -C rook GOARCH=$*
|
||||
|
||||
toolbox.%: rookd.%
|
||||
toolbox.%: rook.%
|
||||
@$(MAKE) -C toolbox GOARCH=$*
|
||||
|
||||
do.build.images.%: rookd.% toolbox.% ;
|
||||
do.build.images.%: rook.% toolbox.% ;
|
||||
do.build: do.build.images.$(GOARCH) ;
|
||||
build.all: $(foreach p,$(PLATFORMS), do.build.images.$(p)) ;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
FROM BASEIMAGE
|
||||
|
||||
ADD rookd /usr/local/bin/
|
||||
ADD rook /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/tini", "--", "/usr/local/bin/rookd"]
|
||||
ENTRYPOINT ["/tini", "--", "/usr/local/bin/rook"]
|
||||
CMD [""]
|
||||
@@ -16,7 +16,7 @@ FROM BASEIMAGE
|
||||
|
||||
ARG EXTRALIBS
|
||||
|
||||
# install runtime dependencies for ceph and rookd
|
||||
# install runtime dependencies for ceph and rook
|
||||
RUN BOOST_VERSION=1.62.0 && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -yy -q --no-install-recommends \
|
||||
@@ -17,8 +17,8 @@ include ../image.mk
|
||||
# ====================================================================================
|
||||
# Image Build Options
|
||||
|
||||
ROOKD_IMAGE = $(BUILD_REGISTRY)/rookd-$(GOARCH)
|
||||
ROOKD_BASE_IMAGE = $(BUILD_REGISTRY)/rookd-base-$(GOARCH)
|
||||
ROOKD_IMAGE = $(BUILD_REGISTRY)/rook-$(GOARCH)
|
||||
ROOKD_BASE_IMAGE = $(BUILD_REGISTRY)/rook-base-$(GOARCH)
|
||||
IMAGES = $(ROOKD_IMAGE) $(ROOKD_BASE_IMAGE)
|
||||
CACHE_IMAGES = $(ROOKD_BASE_IMAGE)
|
||||
|
||||
@@ -52,21 +52,21 @@ $(CEPH_TARBALL):
|
||||
# ====================================================================================
|
||||
# Build Rook
|
||||
|
||||
rookd-base-image: $(CEPH_TARBALL)
|
||||
rook-base-image: $(CEPH_TARBALL)
|
||||
@echo === docker build $(ROOKD_BASE_IMAGE)
|
||||
@cp Dockerfile.base $(TEMP)/Dockerfile
|
||||
@cd $(TEMP) && $(SED_CMD) 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile
|
||||
@docker build $(BUILD_ARGS) --build-arg EXTRALIBS=$(EXTRA_LIBS) -t $(ROOKD_BASE_IMAGE) $(TEMP)
|
||||
|
||||
# since this is a leaf image we avoid leaving around a lot of dangling images
|
||||
# by removing the last build of the final rookd image
|
||||
# by removing the last build of the final rook image
|
||||
OLD_IMAGE_ID := $(shell docker images -q $(ROOKD_IMAGE))
|
||||
CURRENT_IMAGE_ID := $$(docker images -q $(ROOKD_IMAGE))
|
||||
|
||||
do.build: rookd-base-image
|
||||
do.build: rook-base-image
|
||||
@echo === docker build $(ROOKD_IMAGE)
|
||||
@cp Dockerfile $(TEMP)
|
||||
@cp ../../bin/linux_$(GOARCH)/rookd $(TEMP)
|
||||
@cp ../../bin/linux_$(GOARCH)/rook $(TEMP)
|
||||
@cd $(TEMP) && $(SED_CMD) 's|BASEIMAGE|$(ROOKD_BASE_IMAGE)|g' Dockerfile
|
||||
@docker build $(BUILD_ARGS) -t $(ROOKD_IMAGE) $(TEMP)
|
||||
@[ "$(OLD_IMAGE_ID)" != "$(CURRENT_IMAGE_ID)" ] && [ -n "$(OLD_IMAGE_ID)" ] && docker rmi $(OLD_IMAGE_ID) || true
|
||||
@@ -19,7 +19,7 @@ TOOLBOX_BASE_IMAGE = $(BUILD_REGISTRY)/toolbox-base-$(GOARCH)
|
||||
IMAGES = $(TOOLBOX_IMAGE) $(TOOLBOX_BASE_IMAGE)
|
||||
CACHE_IMAGES = $(TOOLBOX_BASE_IMAGE)
|
||||
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/rookd-base-$(GOARCH)
|
||||
BASEIMAGE = $(BUILD_REGISTRY)/rook-base-$(GOARCH)
|
||||
|
||||
TEMP := $(shell mktemp -d)
|
||||
|
||||
@@ -30,7 +30,7 @@ toolbox-base-image:
|
||||
@docker build $(BUILD_ARGS) -t $(TOOLBOX_BASE_IMAGE) $(TEMP)
|
||||
|
||||
# since this is a leaf image we avoid leaving around a lot of dangling images
|
||||
# by removing the last build of the final rookd image
|
||||
# by removing the last build of the final rook image
|
||||
OLD_IMAGE_ID := $(shell docker images -q $(TOOLBOX_IMAGE))
|
||||
CURRENT_IMAGE_ID := $$(docker images -q $(TOOLBOX_IMAGE))
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ func (c *Cluster) makeDeployment() *extensions.Deployment {
|
||||
|
||||
func (c *Cluster) apiContainer() v1.Container {
|
||||
|
||||
command := fmt.Sprintf("/usr/local/bin/rookd api --config-dir=%s --port=%d ", k8sutil.DataDir, model.Port)
|
||||
command := fmt.Sprintf("/usr/local/bin/rook api --config-dir=%s --port=%d ", k8sutil.DataDir, model.Port)
|
||||
return v1.Container{
|
||||
// TODO: fix "sleep 5".
|
||||
// Without waiting some time, there is highly probable flakes in network setup.
|
||||
|
||||
@@ -77,14 +77,14 @@ func TestPodSpecs(t *testing.T) {
|
||||
assert.Equal(t, 0, len(d.ObjectMeta.Annotations))
|
||||
|
||||
cont := d.Spec.Template.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 1, len(cont.VolumeMounts))
|
||||
assert.Equal(t, 7, len(cont.Env))
|
||||
for _, v := range cont.Env {
|
||||
assert.True(t, strings.HasPrefix(v.Name, "ROOKD_"))
|
||||
}
|
||||
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rookd api --config-dir=/var/lib/rook --port=%d", model.Port)
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rook api --config-dir=/var/lib/rook --port=%d", model.Port)
|
||||
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ func getVersion(version string) string {
|
||||
}
|
||||
|
||||
func MakeRookImage(version string) string {
|
||||
return fmt.Sprintf("%s/rookd:%v", repoPrefix(), getVersion(version))
|
||||
return fmt.Sprintf("%s/rook:%v", repoPrefix(), getVersion(version))
|
||||
}
|
||||
|
||||
func PodWithAntiAffinity(pod *v1.Pod, attribute, value string) {
|
||||
|
||||
@@ -24,15 +24,15 @@ import (
|
||||
)
|
||||
|
||||
func TestMakeRookImage(t *testing.T) {
|
||||
assert.Equal(t, "quay.io/rook/rookd:v1", MakeRookImage("v1"))
|
||||
assert.Equal(t, "quay.io/rook/rook:v1", MakeRookImage("v1"))
|
||||
}
|
||||
|
||||
func TestMakeRookImageWithEnv(t *testing.T) {
|
||||
os.Setenv(repoPrefixEnvVar, "myrepo.io/rook")
|
||||
assert.Equal(t, "myrepo.io/rook/rookd:v1", MakeRookImage("v1"))
|
||||
assert.Equal(t, "myrepo.io/rook/rook:v1", MakeRookImage("v1"))
|
||||
os.Setenv(repoPrefixEnvVar, "")
|
||||
}
|
||||
|
||||
func TestDefaultVersion(t *testing.T) {
|
||||
assert.Equal(t, fmt.Sprintf("quay.io/rook/rookd:%s", defaultVersion), MakeRookImage(""))
|
||||
assert.Equal(t, fmt.Sprintf("quay.io/rook/rook:%s", defaultVersion), MakeRookImage(""))
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func (c *Cluster) makeDeployment(id string) *extensions.Deployment {
|
||||
|
||||
func (c *Cluster) mdsContainer(id string) v1.Container {
|
||||
|
||||
command := fmt.Sprintf("/usr/local/bin/rookd mds --config-dir=%s --mds-id=%s ",
|
||||
command := fmt.Sprintf("/usr/local/bin/rook mds --config-dir=%s --mds-id=%s ",
|
||||
k8sutil.DataDir, id)
|
||||
return v1.Container{
|
||||
// TODO: fix "sleep 5".
|
||||
|
||||
@@ -83,11 +83,11 @@ func TestPodSpecs(t *testing.T) {
|
||||
assert.Equal(t, 0, len(d.ObjectMeta.Annotations))
|
||||
|
||||
cont := d.Spec.Template.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 2, len(cont.VolumeMounts))
|
||||
assert.Equal(t, 6, len(cont.Env))
|
||||
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rookd mds --config-dir=/var/lib/rook --mds-id=%s ",
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rook mds --config-dir=/var/lib/rook --mds-id=%s ",
|
||||
mdsID)
|
||||
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
|
||||
@@ -108,7 +108,7 @@ func (c *Cluster) makeDeployment(name string) *extensions.Deployment {
|
||||
|
||||
func (c *Cluster) mgrContainer(name string) v1.Container {
|
||||
|
||||
command := fmt.Sprintf("/usr/local/bin/rookd mgr --config-dir=%s", k8sutil.DataDir)
|
||||
command := fmt.Sprintf("/usr/local/bin/rook mgr --config-dir=%s", k8sutil.DataDir)
|
||||
return v1.Container{
|
||||
// FIX: sleep 5 for a flaky network setup
|
||||
Command: []string{"/bin/sh", "-c", fmt.Sprintf("sleep 5; %s", command)},
|
||||
|
||||
@@ -84,11 +84,11 @@ func TestPodSpec(t *testing.T) {
|
||||
assert.Equal(t, 0, len(d.ObjectMeta.Annotations))
|
||||
|
||||
cont := d.Spec.Template.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 2, len(cont.VolumeMounts))
|
||||
assert.Equal(t, 7, len(cont.Env))
|
||||
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rookd mgr --config-dir=/var/lib/rook")
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rook mgr --config-dir=/var/lib/rook")
|
||||
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func (c *Cluster) makeMonPod(config *MonConfig, nodeName string) *v1.Pod {
|
||||
}
|
||||
|
||||
func (c *Cluster) monContainer(config *MonConfig, fsid string) v1.Container {
|
||||
command := fmt.Sprintf("/usr/local/bin/rookd mon --config-dir=%s --name=%s --port=%d --fsid=%s",
|
||||
command := fmt.Sprintf("/usr/local/bin/rook mon --config-dir=%s --name=%s --port=%d --fsid=%s",
|
||||
k8sutil.DataDir, config.Name, config.Port, fsid)
|
||||
|
||||
return v1.Container{
|
||||
|
||||
@@ -62,11 +62,11 @@ func testPodSpec(t *testing.T, dataDir string) {
|
||||
assert.Equal(t, "myversion", pod.ObjectMeta.Annotations["rook_version"])
|
||||
|
||||
cont := pod.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 2, len(cont.VolumeMounts))
|
||||
assert.Equal(t, 6, len(cont.Env))
|
||||
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rookd mon --config-dir=/var/lib/rook --name=%s --port=%d --fsid=%s",
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rook mon --config-dir=/var/lib/rook --name=%s --port=%d --fsid=%s",
|
||||
config.Name, config.Port, c.clusterInfo.FSID)
|
||||
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
|
||||
@@ -242,7 +242,7 @@ func (c *Cluster) osdContainer(devices []Device, directories []Directory, select
|
||||
// set the hostname to the host's name from the downstream api.
|
||||
// the crush map doesn't like hostnames with periods, so we replace them with underscores.
|
||||
hostnameUpdate := `echo $(HOSTNAME) | sed "s/\./_/g" > /etc/hostname; hostname -F /etc/hostname`
|
||||
command := "/usr/local/bin/rookd osd"
|
||||
command := "/usr/local/bin/rook osd"
|
||||
|
||||
privileged := true
|
||||
return v1.Container{
|
||||
|
||||
@@ -52,7 +52,7 @@ func TestPodContainer(t *testing.T) {
|
||||
container := c.Spec.Containers[0]
|
||||
assert.Equal(t, 7, len(container.Env))
|
||||
assert.True(t, strings.Contains(container.Command[2], `echo $(HOSTNAME) | sed "s/\./_/g" > /etc/hostname; hostname -F /etc/hostname`))
|
||||
assert.True(t, strings.Contains(container.Command[2], "/usr/local/bin/rookd osd"))
|
||||
assert.True(t, strings.Contains(container.Command[2], "/usr/local/bin/rook osd"))
|
||||
}
|
||||
|
||||
func TestDaemonset(t *testing.T) {
|
||||
@@ -96,10 +96,10 @@ func testPodDevices(t *testing.T, dataDir, deviceFilter string, allDevices bool)
|
||||
assert.Equal(t, 0, len(replicaSet.Spec.Template.ObjectMeta.Annotations))
|
||||
|
||||
cont := replicaSet.Spec.Template.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 3, len(cont.VolumeMounts))
|
||||
|
||||
expectedCommand := "/usr/local/bin/rookd osd"
|
||||
expectedCommand := "/usr/local/bin/rook osd"
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
|
||||
// verify the config dir env var
|
||||
|
||||
@@ -149,7 +149,7 @@ func (c *Cluster) makeDeployment() *extensions.Deployment {
|
||||
|
||||
func (c *Cluster) rgwContainer() v1.Container {
|
||||
|
||||
command := fmt.Sprintf("/usr/local/bin/rookd rgw --config-dir=%s --rgw-port=%d --rgw-host=%s",
|
||||
command := fmt.Sprintf("/usr/local/bin/rook rgw --config-dir=%s --rgw-port=%d --rgw-host=%s",
|
||||
k8sutil.DataDir, cephrgw.RGWPort, cephrgw.DNSName)
|
||||
return v1.Container{
|
||||
// TODO: fix "sleep 5".
|
||||
|
||||
@@ -93,11 +93,11 @@ func TestPodSpecs(t *testing.T) {
|
||||
assert.Equal(t, 0, len(d.ObjectMeta.Annotations))
|
||||
|
||||
cont := d.Spec.Template.Spec.Containers[0]
|
||||
assert.Equal(t, "quay.io/rook/rookd:myversion", cont.Image)
|
||||
assert.Equal(t, "quay.io/rook/rook:myversion", cont.Image)
|
||||
assert.Equal(t, 2, len(cont.VolumeMounts))
|
||||
assert.Equal(t, 6, len(cont.Env))
|
||||
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rookd rgw --config-dir=/var/lib/rook --rgw-port=%d --rgw-host=%s",
|
||||
expectedCommand := fmt.Sprintf("/usr/local/bin/rook rgw --config-dir=/var/lib/rook --rgw-port=%d --rgw-host=%s",
|
||||
cephrgw.RGWPort, cephrgw.DNSName)
|
||||
|
||||
assert.NotEqual(t, -1, strings.Index(cont.Command[2], expectedCommand), cont.Command[2])
|
||||
|
||||
Reference in new issue
Block a user