Skip to content

Commit 9194f48

Browse files
committed
Merge pull request #1011 from deis/controller-behind-router
feat(router): route deis.domain to controller
2 parents a6fa7a0 + b800e9b commit 9194f48

16 files changed

Lines changed: 49 additions & 46 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $ cd client && python setup.py install
119119
Use the Deis Client to register a new user.
120120

121121
```console
122-
$ deis register http://local.deisapp.com:8000
122+
$ deis register http://deis.local.deisapp.com
123123
$ deis keys:add
124124
```
125125

client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ version of the Deis client for Mac OS X, Windows, or Debian Linux:
8585

8686
.. code-block:: console
8787
88-
$ deis register http://local.deisapp.com:8000
88+
$ deis register http://deis.local.deisapp.com
8989
$ deis keys:add
9090
9191

contrib/ec2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ you configure your own DNS records using a domain you own. See [Configuring DNS]
8383
## Use Deis!
8484
After that, register with Deis!
8585
```console
86-
$ deis register deis.example.org:8000
86+
$ deis register http://deis.example.org
8787
username: deis
8888
password:
8989
password (confirm):

contrib/rackspace/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You'll need to configure DNS records so you can access applications hosted on De
7878
### Use Deis!
7979
After that, register with Deis!
8080
```console
81-
$ deis register deis.example.org:8000
81+
$ deis register http://deis.example.org
8282
username: deis
8383
password:
8484
password (confirm):

controller/api/serializers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ class Meta:
129129

130130
def validate_id(self, attrs, source):
131131
"""
132-
Check that the ID is all lowercase
132+
Check that the ID is all lowercase and not 'deis'
133133
"""
134134
value = attrs[source]
135135
match = re.match(r'^[a-z0-9-]+$', value)
136136
if not match:
137137
raise serializers.ValidationError("App IDs can only contain [a-z0-9-]")
138+
if value == 'deis':
139+
raise serializers.ValidationError("App IDs cannot be 'deis'")
138140
return attrs
139141

140142

controller/api/tests/test_app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def test_app_errors(self):
100100
body = {'cluster': cluster_id, 'id': 'camelCase'}
101101
response = self.client.post(url, json.dumps(body), content_type='application/json')
102102
self.assertContains(response, 'App IDs can only contain [a-z0-9-]', status_code=400)
103+
url = '/api/apps'
104+
body = {'cluster': cluster_id, 'id': 'deis'}
105+
response = self.client.post(url, json.dumps(body), content_type='application/json')
106+
self.assertContains(response, "App IDs cannot be 'deis'", status_code=400)
103107
body = {'cluster': cluster_id, 'id': app_id}
104108
response = self.client.post(url, json.dumps(body), content_type='application/json')
105109
self.assertEqual(response.status_code, 201)

controller/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ until confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null; do
4242
done
4343

4444
# wait for confd to populate all values
45-
while grep -q '<no value>' /templates/confd_settings.py; do
45+
while grep -q '<no value>' /etc/nginx/nginx.conf; do
4646
echo "controller: waiting for confd to write all values..."
4747
confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null
4848
sleep $(($ETCD_TTL/2)) # sleep for half the TTL

docs/contributing/localdev.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,23 +132,14 @@ receive full admin permissions.
132132

133133
.. code-block:: console
134134
135-
$ deis register http://local.deisapp.com:8000
135+
$ deis register http://deis.local.deisapp.com
136136
username: myuser
137137
password:
138138
password (confirm):
139139
email: myuser@example.com
140140
Registered myuser
141141
Logged in as myuser
142142
143-
.. note::
144-
145-
As of v0.5.1, the proxy was removed for Deis platform services. It has yet to be added
146-
back in. See `issue 535`_ for more details.
147-
148-
As a workaround, use the following:
149-
150-
:code:`deis register http://local.deisapp.com:8000`
151-
152143
Once the user is registered, add your SSH key for ``git push``
153144
access using:
154145

@@ -252,4 +243,3 @@ ensure the pull request doesn't break any tests or reduce code coverage.
252243
.. _`VirtualBox`: https://www.virtualbox.org/
253244
.. _`fork the Deis repository`: https://github.com/deis/deis/fork
254245
.. _`pull request`: https://github.com/deis/deis/pulls
255-
.. _`issue 535`: https://github.com/deis/deis/issues/535

docs/developer/deploy-application.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Deploy an Application
77
=====================
8-
An :ref:`Application` is deployed to Deis using ``git push`` or the ``deis`` client.
8+
An :ref:`Application` is deployed to Deis using ``git push`` or the ``deis`` client.
99

1010
Supported Applications
1111
----------------------
@@ -21,7 +21,7 @@ Before deploying an application, users must first authenticate against the Deis
2121

2222
.. code-block:: console
2323
24-
$ deis login http://example.com:8000
24+
$ deis login http://deis.example.com
2525
username: deis
2626
password:
2727
Logged in as deis
@@ -50,4 +50,4 @@ Learn how to use deploy applications on Deis :ref:`using-dockerfiles`.
5050
.. _`twelve-factor methodology`: http://12factor.net/
5151
.. _`Heroku Buildpacks`: https://devcenter.heroku.com/articles/buildpacks
5252
.. _`Dockerfiles`: http://docs.docker.io/en/latest/use/builder/
53-
.. _`Docker Image`: http://docs.docker.io/introduction/understanding-docker/
53+
.. _`Docker Image`: http://docs.docker.io/introduction/understanding-docker/

docs/developer/register-user.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ to create a new account. You will be logged in automatically.
1414

1515
.. code-block:: console
1616
17-
$ deis register http://deis.example.com:8000
17+
$ deis register http://deis.example.com
1818
username: myuser
1919
password:
2020
password (confirm):
@@ -52,13 +52,11 @@ If you already have an account, use ``deis login`` to authenticate against the D
5252

5353
.. code-block:: console
5454
55-
$ deis login http://example.com:8000
55+
$ deis login http://deis.example.com
5656
username: deis
5757
password:
5858
Logged in as deis
5959
6060
.. note::
6161

6262
Deis session information is stored in your user's ~/.deis directory.
63-
64-
.. _`issue 535`: https://github.com/deis/deis/issues/535

0 commit comments

Comments
 (0)