OpenShift Origin (OKD) 3.10 : Keystone Authentication2018/08/22 |
The OpenShift installation example on this tutorial showed to configure HTPasswd
for Authentication provider, however it's possible to select some Authentication provider except HTPasswd.
On here, Configure Openstack Keystone for Authentication provider.
This example is based on the environment like follows.
-----------+--------------+------------------------------------------+------------ |10.0.0.25 | |10.0.0.51 |10.0.0.52 +----------+-----------+ | +----------+-----------+ +----------+-----------+ | [ ctrl.srv.world ] | | | [ node01.srv.world ] | | [ node02.srv.world ] | | (Master Node) | | | (Compute Node) | | (Compute Node) | | (Infra Node) | | | | | | | (Compute Node) | | | | | | +----------------------+ | +----------------------+ +----------------------+ | +----------------------+ | | [keystone.srv.world ]| | | Openstack Keystone +--+ | |10.0.0.30 | | +----------------------+ |
[1] | |
[2] | Login as root or Cluster admin user and change authentication settings. |
# line 142: change like follows identityProviders: - challenge: true login: true mappingMethod: claim # any name you like name: keystone_auth provider: apiVersion: v1 kind: KeystonePasswordIdentityProvider # keystone domain name (Openstack's default is just the [default]) domainName: default # keystone auth URL url: http://10.0.0.30:5000 ..... .....[origin@ctrl ~]$ |
[3] | Add any user for Openshift Cluster on Keystone Server. |
[root@keystone ~(keystone)]# openstack user create --domain default --password mypassword redhat +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | default | | enabled | True | | id | f397a550c3874908af6000a5f092d54b | | name | redhat | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ |
[4] | Make sure it's possible to login to Openshift Cluster with the user above. |
[cent@ctrl ~]$ oc login
Authentication required for https://ctrl.srv.world:8443 (openshift)
Username: redhat
Password:
Login successful.
You don't have any projects. You can try to create a new project, by running
oc new-project <projectname>
[cent@ctrl ~]$
[cent@ctrl ~]$ oc whoami redhat oc new-project myproject Now using project "myproject" on server "https://ctrl.srv.world:8443". You can add applications to this project with the 'new-app' command. For example, try: oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git to build a new example application in Ruby. ..... ..... |
Sponsored Link |