Skip to content

Commit

Permalink
feat: initial charm (#5)
Browse files Browse the repository at this point in the history
* feat: initial charm skeleton

* feat: initial charm

* chore: use self-hosted

* fix: workflow

* chore: ignore all libs

* chore: revert debug for workflows

* chore: update lib

* debug

* test: command separator

* test: command separator

* test: debug

* test: debug

* test: debug

* test: debug

* test: integratino test module

* test: assert & log

* test: debug

* test: create .ssh dir

* test: ssh dir

* test: ssh dir fix

* test: debug

* test: debug(check id_rsa exist)

* test: generate id_rsa

* test: rebootstrap localhost

* test: rebootstrap localhost

* debug

* debug

* test: wait for id_rsa

* test: copy id_rsa files

* test: try empty password

* test: remove pre-run-script

* test: make id_rsa

* test: enable pre-run-script

* test: fix tests

* test: fix lint

* test: use factoryboy & fix lints

* test: fix dates

* chore: merge charmcraft & metadata

* fix: charmcraft yaml

* chore: revert metadata yaml

* Revert "chore: revert metadata yaml"

This reverts commit 242be68.

* Revert "fix: charmcraft yaml"

This reverts commit 4f0870f.

* Revert "chore: merge charmcraft & metadata"

This reverts commit 924367c.

* feat: handle invalid bind

* fix: tests

* fix: use id_rsa

* fix: feedback

* fix: tests

* chore: remove unused import

* fix: install tmate

* feat: update relation data when ready
  • Loading branch information
yanksyoon authored Jan 15, 2024
1 parent fd48143 commit 51bdc1c
Show file tree
Hide file tree
Showing 38 changed files with 3,874 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ jobs:
with:
juju-channel: 3.1/stable
provider: lxd
tmate-debug: true
pre-run-script: |
-c "chmod +x tests/integration/pre_run_script.sh
./tests/integration/pre_run_script.sh"
self-hosted-runner: true
self-hosted-runner-label: "edge"
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ on:

jobs:
unit-tests:
uses: canonical/operator-workflows/.github/workflows/test.yaml@debug/yanks
uses: canonical/operator-workflows/.github/workflows/test.yaml@main
secrets: inherit
with:
self-hosted-runner: true
self-hosted-runner-label: "edge"
5 changes: 3 additions & 2 deletions .woke.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rules:
# Ignore man-in-the-middle - the operator_libs_linux/v0/apt lib uses this term.
- name: man-in-the-middle
# Ignore whitelist - we are using it to ignore pydantic in pyproject.toml
- name: whitelist
ignore_files:
# Ignore all files under lib dir since they are not managed by the charm.
- lib/
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ A [Juju](https://juju.is/) [charm](https://juju.is/docs/olm/charmed-operators)
deploying and managing [Tmate self-hosted server](https://tmate.io/). Tmate is an
open source terminal multiplexer, providing instant terminal sharing capabilities.

Tmate is a terminal multiplexer that allows remote terminal sharing. It enables users to share
their terminal session with other users over the internet, allowing them to collaborate, provide
technical support, or demonstrate commands and procedures in real-time.
Tmate enables users to share their terminal session with other users over the internet, allowing
them to collaborate, provide technical support, or demonstrate commands and procedures in
real-time.

This charm provides the tmate-ssh-server service, and when paired with the tmate client provides
This charm provides a tmate-ssh-server service, and when paired with the tmate client provides a
self-hosted ssh relay server.

For DevOps and SRE teams, this charm will make operating self hosted tmate-ssh-server simple and
Expand All @@ -24,7 +24,7 @@ project that warmly welcomes community projects, contributions, suggestions,
fixes and constructive feedback.
* [Code of conduct](https://ubuntu.com/community/code-of-conduct)
* [Get support](https://discourse.charmhub.io/)
* [Join our online chat](https://chat.charmhub.io/charmhub/channels/charm-dev)
* [Join our online chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
* [Contribute](https://charmhub.io/tmate-ssh-server/docs/contributing)
* [Getting Started](https://charmhub.io/tmate-ssh-server/docs/getting-started)
Thinking about using the tmate-ssh-server Operator for your next project?
Expand All @@ -40,6 +40,6 @@ For further details,
Run the following command:

```bash
echo -e "tox -e src-docs\ngit add src-docs\n" > .git/hooks/pre-commit
echo -e "tox -e src-docs\ngit add src-docs\n" >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```
6 changes: 6 additions & 0 deletions actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

get-server-config:
description: |
Retrieve the server configuration values and secrets for SSH debug access.
11 changes: 11 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
Loading

0 comments on commit 51bdc1c

Please sign in to comment.