TykTechnologies / tyk-demo

Tyk Docker Demo with full Pro Tyk Installation and more!
51 stars 12 forks source link

Support ubuntu #170

Closed sedkis closed 1 year ago

sedkis commented 2 years ago

When bootstrapping 2 issues happen.

First, is Python plugins never build

and second one is the SSL certification command via openssl doesn't generate a private key in the correct format.

time="Jun 15 21:54:07" level=error msg="Notification signer: Failed loading private key from path: ssh: unsupported key type "PRIVATE KEY""

Here's what the private key looks like:

-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC0KhjUkCJSwb4b
...
61nWxpLgBcVfCzqm4wUMSpE=
-----END PRIVATE KEY-----

It should be an RSA PRIVATE KEY

davegarvey commented 1 year ago

This appears to be happening again, but only on the Github-hosted automated builds, not locally.

When the script runs this command inside the gateway container:

/opt/tyk-gateway/tyk bundle build -k /opt/tyk-gateway/certs/private-key.pem

The output is:

time="Jan 27 16:27:11" level=info msg="Building bundle using 'manifest.json'" prefix=tyk
time="Jan 27 16:27:11" level=warning msg="Using default bundle path 'bundle.zip'" prefix=tyk
tyk: error: ssh: unsupported key type "PRIVATE KEY", try --help
davegarvey commented 1 year ago

Debugging this based on your info @sedkis, the local env makes and RSA PRIVATE KEY, whereas the Github env makes a PRIVATE KEY. Need to figure out why...

davegarvey commented 1 year ago

OpenSSL version difference, based on openssl version command:

davegarvey commented 1 year ago

This can be fixed by moving the openssl command into the container.

davegarvey commented 1 year ago

Resolved in #182 by moving openssl commands to gateway container