Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating a super user #536

Open
dereke opened this issue Jul 3, 2018 · 8 comments
Open

creating a super user #536

dereke opened this issue Jul 3, 2018 · 8 comments

Comments

@dereke
Copy link

dereke commented Jul 3, 2018

After installing (thanks @drgarcia1986)
I have these pods running:

$ kubectl get pods --namespace teresa
NAME                               READY     STATUS    RESTARTS   AGE
baphomet-minio-f4f845f74-ztnqn     1/1       Running   0          1m
baphomet-teresa-64f5756fcc-4bkmc   1/1       Running   0          1m
baphomet-teresa-64f5756fcc-7nddr   1/1       Running   0          1m

The installer lists this command to get the POD_NAME:

$ export POD_NAME=$(kubectl get pods --namespace teresa -l "app=baphomet-teresa" -o jsonpath="{.items[0].metadata.name}")

But running that gives the error:

error: error executing jsonpath "{.items[0].metadata.name}": array index out of bounds: index 0, length 0

Now I assume I could just set the POD_NAME to "baphomet-teresa-64f5756fcc-4bkmc"
but when I do that and I run the create super user command I get this error

$ kubectl exec $POD_NAME -it teresa-server create-super-user --email [email protected] password --namespace teresa
Error: unknown flag: --email
@drgarcia1986
Copy link
Contributor

drgarcia1986 commented Jul 3, 2018

hm... maybe:

$ kubectl exec $POD_NAME -it -n teresa -- ./teresa-server create-super-user --email admin_email --password xxxxxxxx

?

@dereke
Copy link
Author

dereke commented Jul 3, 2018

OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"teresa-server\": executable file not found in $PATH": unknown
command terminated with exit code 126

@drgarcia1986
Copy link
Contributor

I edited my comment @dereke sorry,

- teresa-server
+ ./teresa-server

Thank you for showing us this issues in the helm chart

@dereke
Copy link
Author

dereke commented Jul 3, 2018

OK cool that worked!

Now I am trying to configure the client. Here are the services that are running:

NAME                 TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)           AGE
baphomet-minio-svc   ClusterIP      10.104.24.207    <none>        9000/TCP          27m
baphomet-teresa      LoadBalancer   10.111.132.228   <pending>     50051:30565/TCP   27m

So I've set:

teresa config set-cluster my-teresa --server 10.111.132.228

But when I try and login:

$ teresa login --user [email protected]
Password: ********
Error connecting to server: 10.111.132.228:50051

@drgarcia1986
Copy link
Contributor

In minikube some things work a bit differently.
You need to get the "minikube service url":

$ minikube service baphomet-teresa -n teresa --url --format "{{.IP}}-{{.Port}}"
192.168.99.102-32631

And use it to config the Teresa client:

$ teresa config set-cluster minikube --server 192.168.99.102 --port 32631 --current
$ teresa login --user [email protected]
Password: **********
Login OK

@dereke
Copy link
Author

dereke commented Jul 4, 2018

Oh great that worked.
I managed to create a team, but then trying to create an app using that team gave me "permission denied"
I'm logged in as the user I created during setup. Any idea why that could be?
(sorry for so many questions! is there a user group/forum?)

@drgarcia1986
Copy link
Contributor

Please, feel free to ask any questions as you need.

Admin users can create teams (even if they don't belong of them), but the command teresa team create doesn't automatically add them in the team, to do that you can use the command teresa team add-user.

@drgarcia1986
Copy link
Contributor

if you prefer to talk in a chat group, you can found us in channel Teresa of the Gophers slack group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants