I. General guidance.
- Setup IDE Services server. Make sure it is up and running well.
- Generate ECDSA key pair
- Configure and deploy Code With Me Relay server
II. Generate ECDSA key pair with OpenSSL.
- Run the following commands to generate the keys. They are needed for authenticate IDE Services into Code With Me lobby server.
openssl ecparam -name secp384r1 -genkey -noout -out lobby/lobby_private.pem
openssl ec -in lobby/lobby_private.pem -pubout -out relay/lobby_public.pem
III. Deploy Code With Me relay server
- Locate Container image URL:
docker.io/jetbrains/code-with-me-relay - Specify the service name (e.g. <
company>-code-with-me-relay) and choose the required region in the drop-down list. Note that you should choose the same region as the database server has to be able to connect your Cloud Run instance to the VPC network connected to your database server. - Setup Secret secret containing
publickey (created in Step III). Set pathlobby_public.pem - Specify following Container arguments:
-addr 0.0.0.0:3274 -jwt-key-file /cert/lobby_public.pem -jwt-key-type ecdsa - Click Deploy the service.
IV. Prepare Code With Me configuration file for IDE Services server.
- Append IDE Services config in application.yaml as per following example:
cwm:
lobby:
enabled: true
session-base-url: '${tbe.deployment.url}/code-with-me'
hide-sensitive-logs: false
relay-ecdsa-key: <EDSA private key>
relay-config:
{
"stunTurnServers": [{
"uri": "stun:stun.l.google.com:19302"
},
{
"uri": "stun:stun2.l.google.com:19302"
}
],
"relays": [{
"regionName": "internal",
"latitude": 0,
"longitude": 0,
"servers": [
"wss://RELAY_SERVER_HOSTNAME"
]
}]
}
- You are good to go. Go on and Deploy.
- Test your deployment by starting Code With Me session in IDEA or other IDE managed by your TBE server. Make sure that resulting Session link points to your own TBE server, not to default JetBrains relay servers.
- Enjoy!
Comments
0 comments
Please sign in to leave a comment.