From bc02e76f2db5cc2751343fed49f2b3ba7867c2e4 Mon Sep 17 00:00:00 2001 From: Bassam Tabbara Date: Sun, 25 Jun 2017 10:19:59 -0700 Subject: [PATCH] rename rookd to rook --- Documentation/advanced-configuration.md | 4 ++-- Documentation/cluster-tpr.md | 2 +- Documentation/kubernetes.md | 4 ++-- Documentation/standalone.md | 8 ++++---- Makefile | 2 +- PendingReleaseNotes.md | 5 +++-- build/Releasing.md | 4 ++-- build/release/containers.sh | 8 ++++---- cmd/{rookd => rook}/api.go | 0 cmd/{rookd => rook}/main.go | 8 ++++---- cmd/{rookd => rook}/mds.go | 0 cmd/{rookd => rook}/mgr.go | 0 cmd/{rookd => rook}/mon.go | 0 cmd/{rookd => rook}/operator.go | 0 cmd/{rookd => rook}/osd.go | 0 cmd/{rookd => rook}/rgw.go | 0 cmd/{rookd => rook}/version.go | 4 ++-- cmd/rookctl/version/version.go | 2 +- demo/helm/rook-operator/README.md | 2 +- demo/helm/rook-operator/values.yaml | 2 +- demo/kubernetes/1.5/rook-operator.yaml | 2 +- demo/kubernetes/rook-operator.yaml | 2 +- demo/standalone/Vagrantfile | 4 ++-- demo/standalone/{clean-rookd.sh => clean-rook.sh} | 4 ++-- demo/standalone/cloud-config.yml.in | 2 +- e2e/framework/manager/rook_test_infra.go | 4 ++-- e2e/scripts/smoke_test.sh | 2 +- images/Makefile | 8 ++++---- images/{rookd => rook}/Dockerfile | 4 ++-- images/{rookd => rook}/Dockerfile.base | 2 +- images/{rookd => rook}/Makefile | 12 ++++++------ images/toolbox/Makefile | 4 ++-- pkg/operator/api/api.go | 2 +- pkg/operator/api/api_test.go | 4 ++-- pkg/operator/k8sutil/pod.go | 2 +- pkg/operator/k8sutil/pod_test.go | 6 +++--- pkg/operator/mds/mds.go | 2 +- pkg/operator/mds/mds_test.go | 4 ++-- pkg/operator/mgr/mgr.go | 2 +- pkg/operator/mgr/mgr_test.go | 4 ++-- pkg/operator/mon/spec.go | 2 +- pkg/operator/mon/spec_test.go | 4 ++-- pkg/operator/osd/osd.go | 2 +- pkg/operator/osd/osd_test.go | 6 +++--- pkg/operator/rgw/rgw.go | 2 +- pkg/operator/rgw/rgw_test.go | 4 ++-- 46 files changed, 76 insertions(+), 75 deletions(-) rename cmd/{rookd => rook}/api.go (100%) rename cmd/{rookd => rook}/main.go (98%) rename cmd/{rookd => rook}/mds.go (100%) rename cmd/{rookd => rook}/mgr.go (100%) rename cmd/{rookd => rook}/mon.go (100%) rename cmd/{rookd => rook}/operator.go (100%) rename cmd/{rookd => rook}/osd.go (100%) rename cmd/{rookd => rook}/rgw.go (100%) rename cmd/{rookd => rook}/version.go (92%) rename demo/standalone/{clean-rookd.sh => clean-rook.sh} (87%) rename images/{rookd => rook}/Dockerfile (89%) rename images/{rookd => rook}/Dockerfile.base (97%) rename images/{rookd => rook}/Makefile (90%) diff --git a/Documentation/advanced-configuration.md b/Documentation/advanced-configuration.md index d93c80712..8a2b69857 100644 --- a/Documentation/advanced-configuration.md +++ b/Documentation/advanced-configuration.md @@ -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 diff --git a/Documentation/cluster-tpr.md b/Documentation/cluster-tpr.md index b5b6c01af..6c3d78c57 100644 --- a/Documentation/cluster-tpr.md +++ b/Documentation/cluster-tpr.md @@ -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) diff --git a/Documentation/kubernetes.md b/Documentation/kubernetes.md index d3b693d99..b3380cd92 100644 --- a/Documentation/kubernetes.md +++ b/Documentation/kubernetes.md @@ -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. diff --git a/Documentation/standalone.md b/Documentation/standalone.md index 8700ae3b4..56265cd49 100644 --- a/Documentation/standalone.md +++ b/Documentation/standalone.md @@ -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. ![Standalone Rook Architecture](media/standalone.png) -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. diff --git a/Makefile b/Makefile index 286ea32e5..6f7690de2 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/PendingReleaseNotes.md b/PendingReleaseNotes.md index c18374d7d..499ad3030 100644 --- a/PendingReleaseNotes.md +++ b/PendingReleaseNotes.md @@ -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 diff --git a/build/Releasing.md b/build/Releasing.md index aff8d3c37..bbd7c9093 100644 --- a/build/Releasing.md +++ b/build/Releasing.md @@ -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 ``` diff --git a/build/release/containers.sh b/build/release/containers.sh index e928ee1ff..cb032b7ad 100755 --- a/build/release/containers.sh +++ b/build/release/containers.sh @@ -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 } diff --git a/cmd/rookd/api.go b/cmd/rook/api.go similarity index 100% rename from cmd/rookd/api.go rename to cmd/rook/api.go diff --git a/cmd/rookd/main.go b/cmd/rook/main.go similarity index 98% rename from cmd/rookd/main.go rename to cmd/rook/main.go index 36373c415..7eb6c36d5 100644 --- a/cmd/rookd/main.go +++ b/cmd/rook/main.go @@ -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) } } diff --git a/cmd/rookd/mds.go b/cmd/rook/mds.go similarity index 100% rename from cmd/rookd/mds.go rename to cmd/rook/mds.go diff --git a/cmd/rookd/mgr.go b/cmd/rook/mgr.go similarity index 100% rename from cmd/rookd/mgr.go rename to cmd/rook/mgr.go diff --git a/cmd/rookd/mon.go b/cmd/rook/mon.go similarity index 100% rename from cmd/rookd/mon.go rename to cmd/rook/mon.go diff --git a/cmd/rookd/operator.go b/cmd/rook/operator.go similarity index 100% rename from cmd/rookd/operator.go rename to cmd/rook/operator.go diff --git a/cmd/rookd/osd.go b/cmd/rook/osd.go similarity index 100% rename from cmd/rookd/osd.go rename to cmd/rook/osd.go diff --git a/cmd/rookd/rgw.go b/cmd/rook/rgw.go similarity index 100% rename from cmd/rookd/rgw.go rename to cmd/rook/rgw.go diff --git a/cmd/rookd/version.go b/cmd/rook/version.go similarity index 92% rename from cmd/rookd/version.go rename to cmd/rook/version.go index 14161f500..de2f571fe 100644 --- a/cmd/rookd/version.go +++ b/cmd/rook/version.go @@ -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 diff --git a/cmd/rookctl/version/version.go b/cmd/rookctl/version/version.go index 49560fc8c..4644b66db 100644 --- a/cmd/rookctl/version/version.go +++ b/cmd/rookctl/version/version.go @@ -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 diff --git a/demo/helm/rook-operator/README.md b/demo/helm/rook-operator/README.md index 841d0da19..c03bde5b1 100644 --- a/demo/helm/rook-operator/README.md +++ b/demo/helm/rook-operator/README.md @@ -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` | diff --git a/demo/helm/rook-operator/values.yaml b/demo/helm/rook-operator/values.yaml index b7237c527..fe9f63e7c 100644 --- a/demo/helm/rook-operator/values.yaml +++ b/demo/helm/rook-operator/values.yaml @@ -4,7 +4,7 @@ image: prefix: quay.io/rook - repository: quay.io/rook/rookd + repository: quay.io/rook/rook tag: master-latest pullPolicy: IfNotPresent diff --git a/demo/kubernetes/1.5/rook-operator.yaml b/demo/kubernetes/1.5/rook-operator.yaml index a92c6f961..2d21222d1 100644 --- a/demo/kubernetes/1.5/rook-operator.yaml +++ b/demo/kubernetes/1.5/rook-operator.yaml @@ -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 diff --git a/demo/kubernetes/rook-operator.yaml b/demo/kubernetes/rook-operator.yaml index 6924de78a..722e9a004 100644 --- a/demo/kubernetes/rook-operator.yaml +++ b/demo/kubernetes/rook-operator.yaml @@ -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 diff --git a/demo/standalone/Vagrantfile b/demo/standalone/Vagrantfile index 940e27d05..9b54211fa 100644 --- a/demo/standalone/Vagrantfile +++ b/demo/standalone/Vagrantfile @@ -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 diff --git a/demo/standalone/clean-rookd.sh b/demo/standalone/clean-rook.sh similarity index 87% rename from demo/standalone/clean-rookd.sh rename to demo/standalone/clean-rook.sh index 804b59280..182f3d2d2 100755 --- a/demo/standalone/clean-rookd.sh +++ b/demo/standalone/clean-rook.sh @@ -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 diff --git a/demo/standalone/cloud-config.yml.in b/demo/standalone/cloud-config.yml.in index 798175b46..8219ee693 100644 --- a/demo/standalone/cloud-config.yml.in +++ b/demo/standalone/cloud-config.yml.in @@ -4,7 +4,7 @@ coreos: update: reboot-strategy: off units: - - name: rookd.service + - name: rook.service enable: true command: start drop-ins: diff --git a/e2e/framework/manager/rook_test_infra.go b/e2e/framework/manager/rook_test_infra.go index 0c8b71445..289254fbd 100644 --- a/e2e/framework/manager/rook_test_infra.go +++ b/e2e/framework/manager/rook_test_infra.go @@ -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" diff --git a/e2e/scripts/smoke_test.sh b/e2e/scripts/smoke_test.sh index 4e2c2a74c..3ac35ab6f 100755 --- a/e2e/scripts/smoke_test.sh +++ b/e2e/scripts/smoke_test.sh @@ -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 diff --git a/images/Makefile b/images/Makefile index 6525f551a..a4b13e96e 100644 --- a/images/Makefile +++ b/images/Makefile @@ -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)) ; diff --git a/images/rookd/Dockerfile b/images/rook/Dockerfile similarity index 89% rename from images/rookd/Dockerfile rename to images/rook/Dockerfile index 1d1400c5a..b6fcc3f54 100644 --- a/images/rookd/Dockerfile +++ b/images/rook/Dockerfile @@ -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 [""] diff --git a/images/rookd/Dockerfile.base b/images/rook/Dockerfile.base similarity index 97% rename from images/rookd/Dockerfile.base rename to images/rook/Dockerfile.base index be45f3e7d..4bb466b99 100644 --- a/images/rookd/Dockerfile.base +++ b/images/rook/Dockerfile.base @@ -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 \ diff --git a/images/rookd/Makefile b/images/rook/Makefile similarity index 90% rename from images/rookd/Makefile rename to images/rook/Makefile index 2d402d561..d00c3c85f 100755 --- a/images/rookd/Makefile +++ b/images/rook/Makefile @@ -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 diff --git a/images/toolbox/Makefile b/images/toolbox/Makefile index a3284ef48..4d87fb02a 100644 --- a/images/toolbox/Makefile +++ b/images/toolbox/Makefile @@ -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)) diff --git a/pkg/operator/api/api.go b/pkg/operator/api/api.go index b56c15483..4555a1a46 100644 --- a/pkg/operator/api/api.go +++ b/pkg/operator/api/api.go @@ -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. diff --git a/pkg/operator/api/api_test.go b/pkg/operator/api/api_test.go index 9005661ad..d89984b87 100644 --- a/pkg/operator/api/api_test.go +++ b/pkg/operator/api/api_test.go @@ -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]) } diff --git a/pkg/operator/k8sutil/pod.go b/pkg/operator/k8sutil/pod.go index 76e709869..b46a56e90 100644 --- a/pkg/operator/k8sutil/pod.go +++ b/pkg/operator/k8sutil/pod.go @@ -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) { diff --git a/pkg/operator/k8sutil/pod_test.go b/pkg/operator/k8sutil/pod_test.go index 41596c86d..3fb77cc52 100644 --- a/pkg/operator/k8sutil/pod_test.go +++ b/pkg/operator/k8sutil/pod_test.go @@ -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("")) } diff --git a/pkg/operator/mds/mds.go b/pkg/operator/mds/mds.go index 820b688bf..e97c86a87 100644 --- a/pkg/operator/mds/mds.go +++ b/pkg/operator/mds/mds.go @@ -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". diff --git a/pkg/operator/mds/mds_test.go b/pkg/operator/mds/mds_test.go index 9f269c78f..d2ce69ca8 100644 --- a/pkg/operator/mds/mds_test.go +++ b/pkg/operator/mds/mds_test.go @@ -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]) diff --git a/pkg/operator/mgr/mgr.go b/pkg/operator/mgr/mgr.go index e429aa971..e0d552b5a 100644 --- a/pkg/operator/mgr/mgr.go +++ b/pkg/operator/mgr/mgr.go @@ -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)}, diff --git a/pkg/operator/mgr/mgr_test.go b/pkg/operator/mgr/mgr_test.go index 9bc78baae..a54f93980 100644 --- a/pkg/operator/mgr/mgr_test.go +++ b/pkg/operator/mgr/mgr_test.go @@ -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]) } diff --git a/pkg/operator/mon/spec.go b/pkg/operator/mon/spec.go index 18f3b7e6d..9f37bd377 100644 --- a/pkg/operator/mon/spec.go +++ b/pkg/operator/mon/spec.go @@ -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{ diff --git a/pkg/operator/mon/spec_test.go b/pkg/operator/mon/spec_test.go index c320c5dcb..49478da4d 100644 --- a/pkg/operator/mon/spec_test.go +++ b/pkg/operator/mon/spec_test.go @@ -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]) diff --git a/pkg/operator/osd/osd.go b/pkg/operator/osd/osd.go index e385e034e..b385c18aa 100644 --- a/pkg/operator/osd/osd.go +++ b/pkg/operator/osd/osd.go @@ -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{ diff --git a/pkg/operator/osd/osd_test.go b/pkg/operator/osd/osd_test.go index e626762c0..41e2fd0cd 100644 --- a/pkg/operator/osd/osd_test.go +++ b/pkg/operator/osd/osd_test.go @@ -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 diff --git a/pkg/operator/rgw/rgw.go b/pkg/operator/rgw/rgw.go index 59eec0a1f..5bcc36bfd 100644 --- a/pkg/operator/rgw/rgw.go +++ b/pkg/operator/rgw/rgw.go @@ -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". diff --git a/pkg/operator/rgw/rgw_test.go b/pkg/operator/rgw/rgw_test.go index 8d75894f5..b4cb7fd26 100644 --- a/pkg/operator/rgw/rgw_test.go +++ b/pkg/operator/rgw/rgw_test.go @@ -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])