Skip to content

Conversation

@bsanchez-the-roach
Copy link
Contributor

@bsanchez-the-roach bsanchez-the-roach commented Nov 4, 2025

I've restructured and partially edited Amine El Kouhen's Ory/CRDB Integration Guide.

I've put the information on two separate pages. There's the Ory Overview, which just has information about Ory for people who aren't familiar. This page should ultimately make no mention of CockroachDB. The other page is the Ory Integration Guide, which begins with an overview of what an integration could look like, and then walks you through how to do the integration and test it.

I haven't yet gone through the tutorial step by step myself, I wanted to get more eyes on this first to see if things were looking good. I've left a few comments on the PR. I mainly want thoughts on structure and general content - line-editing won't be as useful at this point, as there are sections that I already know I want to work on.

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 073f610
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/690e5d64182e770008760110

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 073f610
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/690e5d641c6829000808ccdc

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Files changed:


### Alternative: Terraform setup

Provisioning a distributed identity stack can be time-consuming when done manually. The [Ory/CockroachDB sandbox](https://github.com/amineelkouhen/crdb-ory-sandbox) project encapsulates all necessary steps — from creating the CockroachDB cluster and its three Ory databases, to deploying Ory (Kratos, Hydra, and Keto) into an EKS cluster.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs question: All throughout this document there are links to amine's github. That's where the images are coming from, plus there are two hyperlinks that the reader can follow (both here and on line 923) that lead to projects on amine's github. Should all of this stuff instead be hosted on Cockroach corporate github accounts?

@netlify
Copy link

netlify bot commented Nov 4, 2025

Netlify Preview

Name Link
🔨 Latest commit 073f610
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/690e5d641c6829000808ccd8
😎 Deploy Preview https://deploy-preview-20973--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -0,0 +1,23 @@
{
"title": "Integrate",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for any feedback on where to put these pages or what to call them.


{% include_cached copy-clipboard.html %}
~~~ shell
$ hydra_admin_hostname=$(kubectl get svc --namespace ory ory-hydra-admin --template "")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for Amine: I was getting errors when the trying to build with the original line here, which is why the --template flag is an empty string. The original line contained something like

"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")

which the build was failing to deal with. There are six instances of this on the page, all of which I removed.

Copy link

@amine-crl amine-crl Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsanchez-the-roach I think that jekill considers { as a special character, so it fails.

I suggest to replace all code block :
{% include_cached copy-clipboard.html %}
~~~ shell
$ hydra_admin_hostname=$(kubectl get svc --namespace ory ory-hydra-admin --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
$ hydra_public_hostname=$(kubectl get svc --namespace ory ory-hydra-public --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
$ export HYDRA_ADMIN_URL=http://$hydra_admin_hostname:4445
$ export HYDRA_PUBLIC_URL=http://$hydra_public_hostname:4444
~~~

By the following html block:

<div class="highlight">
  <pre>
		<code class="language-shell" data-lang="shell">
			<span class="nv">$ hydra_admin_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-hydra-admin 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ hydra_public_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-hydra-public 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">HYDRA_ADMIN_URL</span>
			<span class="o">=</span>http://
			<span class="nv">$hydra_admin_hostname</span>:4445
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">HYDRA_PUBLIC_URL</span>
			<span class="o">=</span>http://
			<span class="nv">$hydra_public_hostname</span>:4444

		</code>
	</pre>
</div>

~~~ shell
$ helm repo add ory https://k8s.ory.sh/helm/charts
~~~

Copy link

@amine-crl amine-crl Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To @bsanchez-the-roach, add the following text here:
You should now get the following message, confirming the repository was added.

$ export KRATOS_ADMIN_URL=http://$kratos_admin_hostname:4433
$ export KRATOS_PUBLIC_URL=http://$kratos_public_hostname:4434
~~~

Copy link

@amine-crl amine-crl Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsanchez-the-roach I think that jekill considers { as a special character, so it fails.

I suggest to replace all code block :
{% include_cached copy-clipboard.html %}

      $ kratos_admin_hostname=$(kubectl get svc --namespace ory ory-kratos-admin --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
      $ kratos_public_hostname=$(kubectl get svc --namespace ory ory-kratos-public --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
      $ export KRATOS_ADMIN_URL=http://$kratos_admin_hostname:4433
      $ export KRATOS_PUBLIC_URL=http://$kratos_public_hostname:4434 

By the following html block:

<div class="highlight">
  <pre>
		<code class="language-shell" data-lang="shell">
			<span class="nv">$ kratos_admin_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-kratos-admin 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ kratos_public_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-kratos-public 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">KRATOS_ADMIN_URL</span>
			<span class="o">=</span>http://
			<span class="nv">$kratos_admin_hostname</span>:4433
  
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">KRATOS_PUBLIC_URL</span>
			<span class="o">=</span>http://
			<span class="nv">$kratos_public_hostname</span>:4434

		</code>
	</pre>
</div>

$ export KETO_WRITE_REMOTE=http://$keto_write_hostname:4467
$ export KETO_READ_REMOTE=http://$keto_read_hostname:4466
~~~

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsanchez-the-roach I think that jekill considers '{' as a special character, so it fails.

I suggest to replace all code block :
{% include_cached copy-clipboard.html %}

      $ keto_read_hostname=$(kubectl get svc --namespace ory ory-keto-read --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
      $ keto_write_hostname=$(kubectl get svc --namespace ory ory-keto-write --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
      $ export KETO_WRITE_REMOTE=http://$keto_write_hostname:4467
      $ export KETO_READ_REMOTE=http://$keto_read_hostname:4466

By the following html block:

<div class="highlight">
  <pre>
		<code class="language-shell" data-lang="shell">
			<span class="nv">$ keto_read_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-keto-read 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ keto_write_hostname</span>
			<span class="o">=</span>
			<span class="si">$(</span>kubectl get svc 
			<span class="nt">--namespace</span> ory ory-keto-write 
			<span class="nt">--template</span>
			<span class="s2">"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"</span>
			<span class="si">)</span>
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">KETO_WRITE_REMOTE</span>
			<span class="o">=</span>http://
			<span class="nv">$keto_write_hostname</span>:4467
  
			<span class="nv">$ </span>
			<span class="nb">export </span>
			<span class="nv">KETO_READ_REMOTE</span>
			<span class="o">=</span>http://
			<span class="nv">$keto_read_hostname</span>:4466

		</code>
	</pre>
</div>

{% include_cached copy-clipboard.html %}
~~~ shell
$ cockroach sql \
--url "cockroach://root@CRDB_FQDN:26257/defaultdb?sslmode=disable"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is maybe supposed to be postgresql://root@CRDB_FQDN:26257/defaultdb?sslmode=disable


{% include_cached copy-clipboard.html %}
~~~ sql
CREATE USER ory WITH PASSWORD 'securepass';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble with this "CREATE USER" command. I get the following:

ERROR: setting or updating a password is not supported in insecure mode

but it looks like we're explicitly asking them to use that with the "sslmode=disable" part of the "cockroach sql command above" so I'm a bit confused.

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

Successfully merging this pull request may close these issues.

2 participants