[Deis document] management Deis operation of the task
Note: This article translated from Deis official documents, without any commercial purposes, reproduced please indicate the source.
Here are some of the common management of the Deis platform.
Deis users are divided into two categories: regular users and administrators.
– Ordinary users can use the vast majority of Deis functions – create, deploy applications, add and remove domain names, etc.
– Administrators can perform all the operations of ordinary users, but they also have access to all application owners. The first user created on Deis automatically becomes an administrator.
- 【Deis document】 custom Deis custom controller
- 【Deis document】 contribution to the list of PR
- Deis's TLS Endpoint
- Deis installation documents (d) Deis client use
- Deis installation of Deis installation
- The basic concept of Deis
Raise the user as an administrator
You can use the deis perms command to raise the role of an ordinary user to the administrator.
$ deis perms:create john --admin
Reissue the authentication token for the normal user
The Controller Component API uses a very common token-based HTTP authentication method. Token-type authentication for the client-server pattern, such as native desktop and mobile client is more applicable. Each platform user will be issued by the platform when the first registration of a token. If the token is compromised, you need to manually intervene to reissue an authentication token for that user. This step can be done via SSH through the node running the controller component and then opening a Django command line:
$ fleetctl ssh deis-controller
$ docker exec -it deis-controller python manage.py shell
At this point, let us re-issue a certified token for this user. We assume that this unlucky user name is Bob:
>>> from django.contrib.auth.models import User
>>> from rest_framework.authtoken.models import Token
>>> bob = User.objects.get (username = 'bob')
>>> token = Token.objects.get (user = bob)
>>> token.delete ()
>>> exit ()
At this point, Bob can no longer use his previous authentication token to pass the controller's authentication:
$ deis apps
Bob wants to be able to use the API again, he must log in to the controller and regain a new token:
$ deis login http://deis.example.com
Logged in as bob
$ deis apps