Enabling GitHub integration

To enable integration with GitHub:

  1. Enable the following options in the cfg/<project>-development/alan-common-config.yml file:

    • github.enabled: set to true to enable all GitHub integration features:

      • Logon with GitHub accounts

      • Alan AI projects synchronization with GitHub repositories

    • studioLogin.github.enabled: set to true to allow users to log in to Alan AI Studio using GitHub SSO oAuth.

    • github.codeSync.enabled: set to true to allow users to sync their projects with GitHub (push/pull from GitHub repositories or CI/CD).

    • oauth.github.clientId: specify the Client ID for your GitHub OAuth App.

    • Oauth.github.secret: specify the client secret for your GitHub OAuth App.

  2. In GitHub, configure a GitHub OAuth App:

    1. Log in to GitHub and open your organization.

    2. Go to your account > Settings.

    3. In the left pane, select Developer settings.

    4. In the left pane, select OAuth Apps.

    5. In the main work area, click Register a new application.

    6. In the displayed form, enter the application settings:

      • Application name: this name will be shown to users when they are asked to grant or request access to a certain GitHub repository/organization.

      • Homepage URL: the URL should be https://{domain}, replace {domain} with the value you are using in the scripts/_<project>_vars.sh file, the ALAN_DOMAIN variable.

      • Authorization callback URL: the URL should be https://{domain}/githubOauth, replace {domain} with the value you are using in the scripts/_<project>_vars.sh file, the ALAN_DOMAIN variable.

    7. Click Register application below.

    8. In the Client ID section, copy the client ID and save it for later.

    9. In the Client secrets section, click Generate a new client secret, copy and save the generated key for later.

    10. In the cfg/<project>-development/alan-common-config.yml file, set the oauth.github.clientId and oauth.github.secret to the values obtained in steps h and i.

  3. If settings are updated after initial setup:

    1. Run the ./scripts/local-helm-install.sh command to redeploy the cluster.

    2. Wait for old pods to terminate and all new pods to be in status Running 1/1. To check the pods status, run kubectl get pods.

    3. Open a new tab for Alan AI Studio or refresh the current tab for the changes you’ve made to take effect on the client side.