Skip to content

Sc 20043 self hosted runners customer scripts part2#13

Merged
k-shlomi merged 24 commits intomainfrom
sc-20043-self-hosted-runners-customer-scripts-part2
Aug 30, 2023
Merged

Sc 20043 self hosted runners customer scripts part2#13
k-shlomi merged 24 commits intomainfrom
sc-20043-self-hosted-runners-customer-scripts-part2

Conversation

@k-shlomi
Copy link
Copy Markdown
Contributor

No description provided.

@shortcut-integration
Copy link
Copy Markdown

This pull request has been linked to Shortcut Story #20043: self-hosted-runners - customer scripts.

Comment thread README.md Outdated
### Running on CentOS

```shell
make self-hosted-runner centos runner_token=<runner-token> github_org=<github-organization> jit_repo=<jit-repo-name>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why do we need the jit centralize repo name? isn't that relates to self hosted runners that are configured in repo level instead of organization level?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If so this parameter should be optional and an explanation should be added about configuring the runner to the organization or a specific repo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed from doc

Comment on lines +6 to +10
# Check if script is run as root
if [ "$EUID" -eq 0 ]; then
echo "Please run this script as a non-root user."
exit 1
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no need for that as we added it in the make file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -0,0 +1,68 @@
#!/bin/bash
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The name of this scrip should be changed to setup-rootless-docker; hence we don't actually setup the runner here, only installing rootless docker, same to the centos one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread Makefile
sudo yum install -y jq
chmod +x $(SELF_HOSTED_DOCKER_CENTOS_SCRIPT)
./$(SELF_HOSTED_DOCKER_CENTOS_SCRIPT)
else ifeq ($(filter ubuntu,$(MAKECMDGOALS)),ubuntu)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

are we sure we dont need jq installation at ubuntu?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

works with clean ubuntu ami on ec2

Comment thread README.md Outdated
`https://github.com/<your-github-org-name>/jit/settings/actions/runners`

#### Running on CentOS
### Running on CentOS
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We need to add pre-requisit step to install git, and make packages before running this command in both OSs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's in the readme in a lower part. moved it up..

that's from the readme:

Prerequisites

  • Python 3.x
  • Git
  • make

To make sure you have all you can run this command:

Centos distro

sudo yum install -y git make && git clone https://github.com/jitsecurity/jit-customer-scripts.git && cd jit-customer-scripts

Ubuntu distro

sudo apt install -y git make && git clone https://github.com/jitsecurity/jit-customer-scripts.git && cd jit-customer-scripts

Mac

brew install git make && git clone https://github.com/jitsecurity/jit-customer-scripts.git && cd jit-customer-scripts

@k-shlomi k-shlomi merged commit 9191d12 into main Aug 30, 2023
@k-shlomi k-shlomi deleted the sc-20043-self-hosted-runners-customer-scripts-part2 branch August 30, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants