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

feat: Add support for session server #432

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

kayman-mk
Copy link
Collaborator

@kayman-mk kayman-mk commented Jan 15, 2022

Description

This feature allows you to open an interactive web terminal from your Gitlab job and run one-off commands in your CI pipeline. See Interactive Web Terminals.

The connection can be established via an EIP (use enable_eip = true) only.

Closes #92

Migrations required

No.

Verification

still missing

with no session_server

Gitlab Runner still working

with session_server

config.toml is valid
There is a listener on the Gitlab Runner
it is possible to connect to the specified port from localhost
able to execute jobs from Gitlab

@npalm
Copy link
Collaborator

npalm commented Jan 27, 2022

@kayman-mk I am not using this feature, can you give some direction to for testing / setting up. Or even provide an example. Great work!!!

@kayman-mk
Copy link
Collaborator Author

I will, yes. But yesterday I discovered some problems with the Runner when enabling the session_server. So I have to do some more checks before it is ready

By the way: Now it makes sense to place runners and executors in different subnets: Runners in public and Executors in a private one as Gitlab needs to establish a communication to the Runner.

@kayman-mk
Copy link
Collaborator Author

Not sure what's going on here. Deployed this branch, but if I place the Runner in my public subnet I am not able to connect via SSM and I do not see any logs in Cloudwatch. Really strange. May be there are some company restrictions in place. I have to check. Placing the Runner in a private subnet works. Configuration looks good and Gitlab shows the "Debug" button if a job is selected. Seems to be fine.

@kayman-mk
Copy link
Collaborator Author

kayman-mk commented Feb 7, 2022

@npalm If you deploy this branch, make sure that the Runner is placed in a public subnet and it's reachable from the Gitlab instance. Set the following variables

  enable_eip = true
  session_server = {
    timeout           = 1800
    port              = 8093
    gitlab_cidr_block = ["0.0.0.0/0"]
  }

If a job is assigned by this Runner you will notice a "Debug" button on the Gitlab job page. Pressing this button opens a terminal and you are connected to the Executor running the job.

@npalm
Copy link
Collaborator

npalm commented Feb 10, 2022

Changes looks goot, tried to run a test but not working so far. Did not got the runners up on the public subnet. Need a bit more time to run some checks

@npalm
Copy link
Collaborator

npalm commented Feb 24, 2022

@kayman-mk sorry for the late replies, will check the PR this weekend.

@npalm
Copy link
Collaborator

npalm commented Feb 25, 2022

@kayman-mk should it be still in draft?

@kayman-mk
Copy link
Collaborator Author

As I have no idea what's wrong here, let's leave it in draft mode. I'll try to check with my AWS experts what's wrong with our subnets.

From my point of view the development is done here. Just need to check the deployed module.

@npalm
Copy link
Collaborator

npalm commented Nov 27, 2022

Did you got it working?

@kayman-mk
Copy link
Collaborator Author

Still not working, but on my list ...

@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale Issue/PR is stale and closed automatically label Mar 17, 2023
@kayman-mk kayman-mk removed the stale Issue/PR is stale and closed automatically label Mar 17, 2023
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale Issue/PR is stale and closed automatically label May 17, 2023
@kayman-mk kayman-mk removed the stale Issue/PR is stale and closed automatically label May 18, 2023
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale Issue/PR is stale and closed automatically label Jul 18, 2023
@kayman-mk kayman-mk removed the stale Issue/PR is stale and closed automatically label Jul 27, 2023
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale Issue/PR is stale and closed automatically label Sep 26, 2023
@github-actions
Copy link
Contributor

This PR was closed because it has been stalled for 15 days with no activity.

@github-actions github-actions bot closed this Oct 12, 2023
@kayman-mk kayman-mk removed the stale Issue/PR is stale and closed automatically label Oct 12, 2023
@kayman-mk kayman-mk reopened this Oct 12, 2023
@kayman-mk kayman-mk added the work-in-progress Issue/PR is worked, should not become stale label Nov 12, 2023
@kayman-mk
Copy link
Collaborator Author

It seems that the session server can't be used with all executors. It might be the case that it is not working for docker+machine. Saw some comments on Stackoverflow.

@kayman-mk
Copy link
Collaborator Author

and just another ocmment: If you are using a reverse proxy with your GitLab instance, web terminals need to be enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress Issue/PR is worked, should not become stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for session_server
2 participants