Browse Source

Move images to Docker Hub

I choose to use the Fully Qualified Registry Name everywhere
(`docker.io/weaveworks/flux`) instead of using the shorthand
(`weaveworks/flux`) so it gets picked up when someone is for example
excluding docker.io images using `--registry-exclude-image=docker.io/*`
Hidde Beydals 4 months ago
parent
commit
992bdd3a80

+ 7
- 7
.circleci/config.yml View File

@@ -19,9 +19,9 @@ jobs:
19 19
           name: Maybe push master image
20 20
           command: |
21 21
             if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then
22
-              docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
23
-              docker push "quay.io/weaveworks/flux:$(docker/image-tag)"
24
-              docker push "quay.io/weaveworks/helm-operator:$(docker/image-tag)"
22
+              echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin 
23
+              docker push "docker.io/weaveworks/flux:$(docker/image-tag)"
24
+              docker push "docker.io/weaveworks/helm-operator:$(docker/image-tag)"
25 25
             fi
26 26
 
27 27
       - deploy:
@@ -31,13 +31,13 @@ jobs:
31 31
               go get github.com/weaveworks/github-release
32 32
               make release-bins
33 33
               bin/upload-binaries
34
-              docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
35
-              docker push "quay.io/weaveworks/flux:${CIRCLE_TAG}"
34
+              echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin
35
+              docker push "docker.io/weaveworks/flux:${CIRCLE_TAG}"
36 36
             fi
37 37
             if echo "${CIRCLE_TAG}" | grep -Eq "helm-[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
38
-              docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" quay.io
38
+              echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin
39 39
               RELEASE_TAG=$(echo "$CIRCLE_TAG" | cut -c 6-)
40
-              docker push "quay.io/weaveworks/helm-operator:${RELEASE_TAG}"
40
+              docker push "docker.io/weaveworks/helm-operator:${RELEASE_TAG}"
41 41
             fi
42 42
   e2e-testing:
43 43
     machine: true

+ 1
- 1
Makefile View File

@@ -47,7 +47,7 @@ test: test/bin/helm test/bin/kubectl
47 47
 build/.%.done: docker/Dockerfile.%
48 48
 	mkdir -p ./build/docker/$*
49 49
 	cp $^ ./build/docker/$*/
50
-	$(SUDO) docker build -t quay.io/weaveworks/$* -t quay.io/weaveworks/$*:$(IMAGE_TAG) \
50
+	$(SUDO) docker build -t docker.io/weaveworks/$* -t docker.io/weaveworks/$*:$(IMAGE_TAG) \
51 51
 		--build-arg VCS_REF="$(VCS_REF)" \
52 52
 		--build-arg BUILD_DATE="$(BUILD_DATE)" \
53 53
 		-f build/docker/$*/Dockerfile.$* ./build/docker/$*

+ 1
- 1
api/v9/change_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 )
10 10
 
11 11
 func TestChangeEncoding(t *testing.T) {
12
-	ref, _ := image.ParseRef("quay.io/weaveworks/flux")
12
+	ref, _ := image.ParseRef("docker.io/weaveworks/flux")
13 13
 	name := ref.Name
14 14
 
15 15
 	for _, update := range []Change{

+ 2
- 2
chart/flux/README.md View File

@@ -183,7 +183,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
183 183
 
184 184
 | Parameter                                         | Default                                              | Description
185 185
 | -----------------------------------------------   | ---------------------------------------------------- | ---
186
-| `image.repository`                                | `quay.io/weaveworks/flux`                            | Image repository
186
+| `image.repository`                                | `docker.io/weaveworks/flux`                          | Image repository
187 187
 | `image.tag`                                       | `<VERSION>`                                          | Image tag
188 188
 | `replicaCount`                                    | `1`                                                  | Number of Flux pods to deploy, more than one is not desirable.
189 189
 | `image.pullPolicy`                                | `IfNotPresent`                                       | Image pull policy
@@ -239,7 +239,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
239 239
 | `memcached.resources`                             | `None`                                               | CPU/memory resource requests/limits for memcached
240 240
 | `helmOperator.create`                             | `false`                                              | If `true`, install the Helm operator
241 241
 | `helmOperator.createCRD`                          | `true`                                               | Create the `v1beta1` and `v1alpha2` Flux CRDs. Dependent on `helmOperator.create=true`
242
-| `helmOperator.repository`                         | `quay.io/weaveworks/helm-operator`                   | Helm operator image repository
242
+| `helmOperator.repository`                         | `docker.io/weaveworks/helm-operator`                 | Helm operator image repository
243 243
 | `helmOperator.tag`                                | `<VERSION>`                                          | Helm operator image tag
244 244
 | `helmOperator.replicaCount`                       | `1`                                                  | Number of helm operator pods to deploy, more than one is not desirable.
245 245
 | `helmOperator.pullPolicy`                         | `IfNotPresent`                                       | Helm operator image pull policy

+ 2
- 2
chart/flux/values.yaml View File

@@ -6,7 +6,7 @@ token: ""
6 6
 replicaCount: 1
7 7
 
8 8
 image:
9
-  repository: quay.io/weaveworks/flux
9
+  repository: docker.io/weaveworks/flux
10 10
   tag: 1.12.0
11 11
   pullPolicy: IfNotPresent
12 12
   pullSecret:
@@ -19,7 +19,7 @@ helmOperator:
19 19
   replicaCount: 1
20 20
   create: false
21 21
   createCRD: true
22
-  repository: quay.io/weaveworks/helm-operator
22
+  repository: docker.io/weaveworks/helm-operator
23 23
   tag: 0.8.0
24 24
   pullPolicy: IfNotPresent
25 25
   pullSecret:

+ 2
- 2
deploy-helm/helm-operator-deployment.yaml View File

@@ -60,9 +60,9 @@ spec:
60 60
       containers:
61 61
       - name: flux-helm-operator
62 62
         # There are no ":latest" images for helm-operator. Find the most recent
63
-        # release or image version at https://quay.io/weaveworks/helm-operator
63
+        # release or image version at https://hub.docker.com/r/weaveworks/helm-operator/tags
64 64
         # and replace the tag here.
65
-        image: quay.io/weaveworks/helm-operator:0.8.0
65
+        image: docker.io/weaveworks/helm-operator:0.8.0
66 66
         imagePullPolicy: IfNotPresent
67 67
         ports:
68 68
         - name: http

+ 1
- 1
deploy-helm/weave-cloud-helm-operator-deployment.yaml View File

@@ -27,7 +27,7 @@ spec:
27 27
             secretName: flux-git-deploy
28 28
       containers:
29 29
         - name: flux-helm-operator
30
-          image: quay.io/weaveworks/helm-operator:0.8.0
30
+          image: docker.io/weaveworks/helm-operator:0.8.0
31 31
           imagePullPolicy: IfNotPresent
32 32
           args:
33 33
             - --git-timeout=20s

+ 2
- 2
deploy/flux-deployment.yaml View File

@@ -52,9 +52,9 @@ spec:
52 52
       containers:
53 53
       - name: flux
54 54
         # There are no ":latest" images for flux. Find the most recent
55
-        # release or image version at https://quay.io/weaveworks/flux
55
+        # release or image version at https://hub.docker.com/r/weaveworks/flux/tags
56 56
         # and replace the tag here.
57
-        image: quay.io/weaveworks/flux:1.12.0
57
+        image: docker.io/weaveworks/flux:1.12.0
58 58
         imagePullPolicy: IfNotPresent
59 59
         resources:
60 60
           requests:

+ 2
- 2
image/image.go View File

@@ -33,7 +33,7 @@ var (
33 33
 // Examples (stringified):
34 34
 //   * alpine
35 35
 //   * library/alpine
36
-//   * quay.io/weaveworks/flux
36
+//   * docker.io/weaveworks/flux
37 37
 //   * localhost:5000/arbitrary/path/to/repo
38 38
 type Name struct {
39 39
 	Domain, Image string
@@ -107,7 +107,7 @@ func (i Name) ToRef(tag string) Ref {
107 107
 // Examples (stringified):
108 108
 //  * alpine:3.5
109 109
 //  * library/alpine:3.5
110
-//  * quay.io/weaveworks/flux:1.1.0
110
+//  * docker.io/weaveworks/flux:1.1.0
111 111
 //  * localhost:5000/arbitrary/path/to/repo:revision-sha1
112 112
 type Ref struct {
113 113
 	Name

+ 1
- 1
internal_docs/releasing.md View File

@@ -3,7 +3,7 @@
3 3
 The release process needs to do these things:
4 4
 
5 5
  - create a new release on GitHub, with a tag
6
- - push Docker image(s) to quay.io
6
+ - push Docker image(s) to Docker Hub
7 7
  - possibly upload the [`fluxctl` binaries](/site/fluxctl.md#binary-releases) to the GitHub release
8 8
  - make sure the version is entered into the checkpoint database so that up-to-date checks report back accurate information
9 9
 

+ 5
- 1
registry/cache/memcached/integration_test.go View File

@@ -34,7 +34,11 @@ func TestWarming_WarmerWriteCacheRead(t *testing.T) {
34 34
 	// This repo has a stable number of images in the low tens (just
35 35
 	// <20); more than `burst` below, but not so many that timing out
36 36
 	// is likely.
37
-	id, _ := image.ParseRef("quay.io/weaveworks/kured")
37
+	// TODO(hidde): I temporary switched this to one of our images on
38
+	// Docker Hub due to Quay.io outage. It is however not guaranteed
39
+	// the amount of tags for this image stays stable and in the low
40
+	// tens.
41
+	id, _ := image.ParseRef("docker.io/weaveworks/flagger-loadtester")
38 42
 
39 43
 	logger := log.NewLogfmtLogger(os.Stderr)
40 44
 

+ 1
- 1
registry/cache/registry.go View File

@@ -32,7 +32,7 @@ type Cache struct {
32 32
 }
33 33
 
34 34
 // GetImageRepositoryMetadata returns the metadata from an image
35
-// repository (e.g,. at "quay.io/weaveworks/flux")
35
+// repository (e.g,. at "docker.io/weaveworks/flux")
36 36
 func (c *Cache) GetImageRepositoryMetadata(id image.Name) (image.RepositoryMetadata, error) {
37 37
 	repoKey := NewRepositoryKey(id.CanonicalName())
38 38
 	bytes, _, err := c.Reader.GetKey(repoKey)

+ 1
- 1
registry/client.go View File

@@ -56,7 +56,7 @@ func (entry *ImageEntry) UnmarshalJSON(bytes []byte) error {
56 56
 }
57 57
 
58 58
 // Client is a remote registry client for a particular image
59
-// repository (e.g., for quay.io/weaveworks/flux). It is an interface
59
+// repository (e.g., for docker.io/weaveworks/flux). It is an interface
60 60
 // so we can wrap it in instrumentation, write fake implementations,
61 61
 // and so on.
62 62
 type Client interface {

+ 2
- 2
registry/imageentry_test.go View File

@@ -22,7 +22,7 @@ func TestImageEntryRoundtrip(t *testing.T) {
22 22
 		assert.Equal(t, entry, entry2)
23 23
 	}
24 24
 
25
-	ref, err := image.ParseRef("quay.io/weaveworks/flux:1.0.0")
25
+	ref, err := image.ParseRef("docker.io/weaveworks/flux:1.0.0")
26 26
 	assert.NoError(t, err)
27 27
 
28 28
 	info := image.Info{
@@ -44,7 +44,7 @@ func TestImageEntryRoundtrip(t *testing.T) {
44 44
 // Check that existing entries, which are image.Info, will parse into
45 45
 // the ImageEntry struct.
46 46
 func TestImageInfoParsesAsEntry(t *testing.T) {
47
-	ref, err := image.ParseRef("quay.io/weaveworks/flux:1.0.0")
47
+	ref, err := image.ParseRef("docker.io/weaveworks/flux:1.0.0")
48 48
 	assert.NoError(t, err)
49 49
 	info := image.Info{
50 50
 		ID:        ref,

+ 2
- 2
site/faq.md View File

@@ -84,9 +84,9 @@ example. We may return to the matter of staged deployments.
84 84
 ### Are there nightly builds I can run?
85 85
 
86 86
 There are builds from CI for each merge to master branch. See
87
-[quay.io/weaveworks/flux](https://quay.io/repository/weaveworks/flux?tab=tags)
87
+[weaveworks/flux](https://hub.docker.com/r/weaveworks/flux/tags)
88 88
 and
89
-[quay.io/weaveworks/helm-operator](https://quay.io/repository/weaveworks/helm-operator?tag=latest&tab=tags).
89
+[weaveworks/helm-operator](https://hub.docker.com/r/weaveworks/helm-operator/tags).
90 90
 
91 91
 ## Technical questions
92 92
 

+ 9
- 9
site/get-started-developing.md View File

@@ -7,7 +7,7 @@ This guide shows a workflow for making a small (actually, tiny) change to Flux,
7 7
 > From a very high level, there are at least 3 ways you can develop on Flux once you have your environment set up:
8 8
 > 1. The "minimalist" approach (only requires and `kubectl`):
9 9
 >    1. `make`
10
->    1. copy the specific image tag (e.g. `quay.io/weaveworks/flux:master-a86167e4`) for what you just built and paste it into `/deploy/flux-deployment.yaml` as the image you're targeting to deploy
10
+>    1. copy the specific image tag (e.g. `docker.io/weaveworks/flux:master-a86167e4`) for what you just built and paste it into `/deploy/flux-deployment.yaml` as the image you're targeting to deploy
11 11
 >    1. deploy the resources in `/develop/*.yaml` manually with `kubectl apply`
12 12
 >    1. make a change to the code
13 13
 >    1. see your code changes have been deployed
@@ -85,19 +85,19 @@ Now that we know everything is working with `flux-getting-started`, we're going
85 85
     In the same terminal you ran `eval $(minikube docker-env)`, run `dep ensure` followed by `make` from the root directory of the Flux repo.  You'll see docker's usual output as it builds the image layers.  Once it's done, you should see something like this in the middle of the output:
86 86
     ```
87 87
     Successfully built 606610e0f4ef
88
-    Successfully tagged quay.io/weaveworks/flux:latest
89
-    Successfully tagged quay.io/weaveworks/flux:master-a86167e4
88
+    Successfully tagged docker.io/weaveworks/flux:latest
89
+    Successfully tagged docker.io/weaveworks/flux:master-a86167e4
90 90
     ```
91 91
     This confirms that a new docker image was tagged for your image.
92 92
 
93
-1. Open up [`deploy/flux-deployment.yaml`](deploy/flux-deployment.yaml) and update the image at `spec.template.spec.containers[0].image` to be simply `quay.io/weaveworks/flux`.  While we're here, also change the `git-url` to point towards your fork.  It will look something like this in the yaml:
93
+1. Open up [`deploy/flux-deployment.yaml`](deploy/flux-deployment.yaml) and update the image at `spec.template.spec.containers[0].image` to be simply `docker.io/weaveworks/flux`.  While we're here, also change the `git-url` to point towards your fork.  It will look something like this in the yaml:
94 94
     ```yaml
95 95
     spec:
96 96
       template:
97 97
         spec:
98 98
           containers:
99 99
           - name: flux
100
-            image: quay.io/weaveworks/flux
100
+            image: docker.io/weaveworks/flux
101 101
             imagePullPolicy: IfNotPresent
102 102
             args:
103 103
               - --git-url=git@github.com:<YOUR-GITHUB-USERNAME>/flux-getting-started
@@ -144,8 +144,8 @@ Now that we know everything is working with `flux-getting-started`, we're going
144 144
 
145 145
     You should see an output that looks something like this:
146 146
     ```
147
-    ts=2019-02-28T18:58:45.091531939Z caller=warming.go:268 component=warmer info="refreshing image" image=quay.io/ weaveworks/flux tag_count=60 to_update=60 of_which_refresh=0 of_which_missing=60
148
-    ts=2019-02-28T18:58:46.233723421Z caller=warming.go:364 component=warmer updated=quay.io/weaveworks/flux    successful=60 attempted=60
147
+    ts=2019-02-28T18:58:45.091531939Z caller=warming.go:268 component=warmer info="refreshing image" image=docker.io/weaveworks/flux tag_count=60 to_update=60 of_which_refresh=0 of_which_missing=60
148
+    ts=2019-02-28T18:58:46.233723421Z caller=warming.go:364 component=warmer updated=docker.io/weaveworks/flux    successful=60 attempted=60
149 149
     ts=2019-02-28T18:58:46.234086642Z caller=images.go:17 component=sync-loop msg="polling images"
150 150
     ts=2019-02-28T18:58:46.234125646Z caller=images.go:27 component=sync-loop msg="no automated services"
151 151
     ts=2019-02-28T18:58:46.749598558Z caller=warming.go:268 component=warmer info="refreshing image" image=memcached    tag_count=66 to_update=66 of_which_refresh=0 of_which_missing=66
@@ -173,9 +173,9 @@ Now that we know everything is working with `flux-getting-started`, we're going
173 173
     flux-6f7fd5bbc-6j9d5   1/1     Running   0          10s
174 174
     ```
175 175
 
176
-    This pod was deployed even though we didn't run any `kubectl` commands or interact with Kubernetes directly because of the `freshpod` Minikube addon that we enabled earlier.  Freshpod saw that a new Docker image was tagged for `quay.io/weaveworks/flux:latest` and it went ahead and redeployed that pod for us.
176
+    This pod was deployed even though we didn't run any `kubectl` commands or interact with Kubernetes directly because of the `freshpod` Minikube addon that we enabled earlier.  Freshpod saw that a new Docker image was tagged for `docker.io/weaveworks/flux:latest` and it went ahead and redeployed that pod for us.
177 177
 
178
-    Consider that simply applying the `flux-deployment.yaml` file again wouldn't do anything since the actual image we're targeting (which is actually `quay.io/weaveworks/flux` with no `:latest` tag, but it's the same difference) hasn't changed.  The Kubernetes api server will get that JSON request from kubectl and go: "right... so nothing has changed in the file so I have nothing to do... IGNORE!".
178
+    Consider that simply applying the `flux-deployment.yaml` file again wouldn't do anything since the actual image we're targeting (which is actually `docker.io/weaveworks/flux` with no `:latest` tag, but it's the same difference) hasn't changed.  The Kubernetes api server will get that JSON request from kubectl and go: "right... so nothing has changed in the file so I have nothing to do... IGNORE!".
179 179
 
180 180
     There is another way to do this, of course.  Remember that before when we ran `make` that we did _also_ get an image tagged with the `:<branch>-<commit hash>` syntax (in our specific example above it was `:master-a86167e4`).  We could, in theory, grab that tag every time we `make`, and then paste it into `spec.template.spec.containers[0].image` of our deployment.  That's tedious and error prone.  Instead, `freshpod` cuts this step out for us and accomplishes the same end goal.
181 181
 

+ 1
- 1
site/troubleshooting.md View File

@@ -111,7 +111,7 @@ happen:
111 111
    ```yaml
112 112
     spec:
113 113
       containers:
114
-        image: quay.io/weaveworks/flux
114
+        image: docker.io/weaveworks/flux
115 115
         ...
116 116
         volumeMounts:
117 117
         - name: acr-credentials

+ 1
- 1
test/bin/test-flux View File

@@ -22,7 +22,7 @@ minikube start --profile "$PROFILE" --keep-context
22 22
 MINIKUBE_IP=$(minikube --profile "$PROFILE" ip)
23 23
 
24 24
 # Copy the latest Flux image into the minikube VM
25
-docker save quay.io/weaveworks/flux:latest | (eval $(minikube --profile "$PROFILE" docker-env) && docker load)
25
+docker save "docker.io/weaveworks/flux:latest" | (eval $(minikube --profile "$PROFILE" docker-env) && docker load)
26 26
 
27 27
 # Create a central git repo inside the minikube VM and get the host key for ssh access
28 28
 minikube --profile "$PROFILE" ssh -- git init --bare /home/docker/flux.git

+ 2
- 2
test/e2e/e2e-flux-chart.sh View File

@@ -7,8 +7,8 @@ REPO_ROOT=$(git rev-parse --show-toplevel)
7 7
 KNOWN_HOSTS=$(cat ${REPO_ROOT}/test/e2e/known_hosts)
8 8
 
9 9
 echo ">>> Loading $(docker/image-tag) into the cluster"
10
-kind load docker-image "quay.io/weaveworks/flux:$(docker/image-tag)"
11
-kind load docker-image "quay.io/weaveworks/helm-operator:$(docker/image-tag)"
10
+kind load docker-image "docker.io/weaveworks/flux:$(docker/image-tag)"
11
+kind load docker-image "docker.io/weaveworks/helm-operator:$(docker/image-tag)"
12 12
 
13 13
 echo ">>> Installing Flux with Helm"
14 14
 helm install --name flux --wait \

+ 1
- 1
test/flux-deploy-all.yaml View File

@@ -76,7 +76,7 @@ spec:
76 76
       containers:
77 77
       - name: flux
78 78
         # Require locally built image
79
-        image: quay.io/weaveworks/flux:latest
79
+        image: docker.io/weaveworks/flux:latest
80 80
         imagePullPolicy: Never
81 81
         ports:
82 82
         - containerPort: 3030 # informational

Loading…
Cancel
Save