{"id":19808799,"url":"https://github.com/premai-io/ayup","last_synced_at":"2025-05-01T07:32:49.364Z","repository":{"id":248901497,"uuid":"830000470","full_name":"premAI-io/Ayup","owner":"premAI-io","description":"Quickly and securely turn any Linux box into a build and deployment assistant","archived":false,"fork":false,"pushed_at":"2024-09-16T14:09:10.000Z","size":181,"stargazers_count":26,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-17T16:03:53.532Z","etag":null,"topics":["assistant","deployment","development"],"latest_commit_sha":null,"homepage":"https://premai.io?utm_source=ayup","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/premAI-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T12:14:55.000Z","updated_at":"2024-09-16T20:25:41.000Z","dependencies_parsed_at":"2024-09-13T22:30:06.264Z","dependency_job_id":null,"html_url":"https://github.com/premAI-io/Ayup","commit_stats":null,"previous_names":["premai-io/ayup"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premAI-io%2FAyup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premAI-io%2FAyup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premAI-io%2FAyup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premAI-io%2FAyup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/premAI-io","download_url":"https://codeload.github.com/premAI-io/Ayup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224245853,"owners_count":17279649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant","deployment","development"],"created_at":"2024-11-12T09:14:49.199Z","updated_at":"2024-11-12T09:14:49.275Z","avatar_url":"https://github.com/premAI-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vision\n\n🚀 Quickly and securely turn any Linux box into a build and deployment assistant.\n\n![ayup-push-2](https://github.com/user-attachments/assets/b96a0bf8-f515-4187-a2da-e02274b31e22)\n\n🔓 Both the Ayup server and client are open source. The Ayup server can run on most Linux systems and\nthe client on Linux, Mac and (eventually) Windows.\n\n🌐 Web applications have their ports forwarded to the client. Allowing them to be accessed as if they\nwere running locally. Applications can also be served on a sub-domain of the server via the builtin\nproxy.\n\n🛠️ Figuring out how to generate, build or serve your app is left to [pluggable\nassistants](docs/assistants.md). These can be written in any language and are ran inside a\ncontainer. They can be chained together like middleware.\n\n# State / Roadmap\n\nAyup is in the early stages of production. Presently the focus is on generalising it by offloading\nwork into generic assistants.\n\n## Tasks\n\nSome of the things that have been done so far are\n\n- [x] Quick source upload\n- [x] Build and serve Python applications of a particular form\n- [x] Port forwarding to client with fixed ports\n- [x] Subdomain routing\n- [x] Build and run applications with a Dockerfile\n- [x] Secure server login and connection\n- [x] Rootless (run as a normal user)\n- [x] Pluggable analysis/build/run step(s) (Assistants)\n- [x] Detect appropriate ports to forward (In Dockefile)\n\nIn the pipeline (in no particular order)\n\n- [ ] Multiple simultaneous applications\n- [ ] All-in-one executable\n- [ ] Watch mode for build and deploy on save\n- [ ] Deploy itself in daemon mode\n\n# Install\n\n## Client\n\nThe client CLI can be installed by copying the following into a terminal session:\n\n```sh\ncurl -#L https://raw.githubusercontent.com/premAI-io/Ayup/main/script/install.sh | sh\n```\n\nOr you can download the executable from the [release page](https://github.com/premAI-io/Ayup/releases/latest).\nIt's just one file, you can copy it to `/usr/bin` or wherever you put executables on your system.\n\nPresently the server is in the same executable as the client. However it has some dependencies.\n\n## Server\n\nThere are two easy ways to install the server: Nix and Docker. In both cases installing and running\nare practically the same operation.\n\nFor Docker you can do\n\n```sh\n$ mkdir ~/.config/ayup\n$ docker run --privileged --rm -it -v ~/.config/ayup:/etc/ayup -p 50051:50051 premai/ayup:latest ay daemon start --host=/ip4/0.0.0.0/tcp/50051\n```\n\n\u003e [!TIP]\n\u003e The Ayup server only supports Linux, but Docker Desktop should be able to run it on Windows\n\u003e and Mac.\n\nWith Nix you can start a shell and run `ay`\n\n```sh\n$ nix shell github:premAI-io/Ayup\n$ ay daemon start --host=/ip4/0.0.0.0/tcp/50051\n```\n\nSee the development section for more information on Nix.\n\nTo install the server manually, follow the instructions for the client and then install the\ndependencies listed in `distros/nix/server.nix`.\n\n# Running\n\n## Server\n\nTo start Ayup listening for local connections do\n\n```sh\n$ ay daemon start\n```\n\nTo run it securely on a remote computer listening on all addresses do\n\n```sh\n$ ay daemon start --host=/ip4/0.0.0.0/tcp/50051\n```\n\nThis sets the listen address to a libp2p multiaddress, when Ayup sees this it will only allow\nencrypted connections using libp2p.\n\nAyup will print details on how to login to the server from a client. This requires shell access to\nthe Ayup server so that you can interactively authorize the client.\n\n\u003e [!NOTE]\n\u003e The IP address in the printed multiaddress will only be accessible locally when using Docker. It may need\n\u003e to be replaced with the host's public IP or DNS name. For e.g\n\u003e `/dns4/example.com/tcp/50051/p2p/1...`\n\nClients can also be pre-authorized by adding their peer IDs to `AYUP_P2P_AUTHORIZED_CLIENTS`. A\nserver config can be generated with the current client pre-authorized.\n\n```sh\n$ ay daemon preauth \u003e env\n```\n\nAssuming Ayup runs under the ayup user, the `env` file can be written to\n`/home/ayup/.config/ayup/env` or you can set the contained environment variables some other way\n\n## Client\n\nIf the Ayup server is running locally, then all you need to do is change to a source code directory\nand run `ay app push`\n\nOtherwise you first need to login. The server prints the login command you need to use, it will look\nsomething like:\n\n```\n$ ay login /ip4/192.168.0.1/tcp/50051/p2p/1...\n```\n\nIf you need to get the client's peer ID to pre-authorize it then just run login with a nonsense\naddress\n\n```\n$ ay login foo\n```\n\nLogin always prints the client's peer ID. \n\nThe login command will set `AYUP_PUSH_HOST` in `~/.config/ayup/env` to the address we used to login\nto. So that `ay app push` will use it by default. You can override it in the environment or by using\n`--host`.\n\n## Config\n\nAll of Ayup's configuration is done via environment variables or command line switches. However you\ncan also set environment variables in `~/.config/ayup/env` which is in the usual\n[dotenv format](https://github.com/joho/godotenv).\n\nSettings you choose interactively will be persisted to the env file if possible. Command line switches and\nenvironment variables take precedence over the env file.\n\nYou can see all available config using the `--help` switch e.g. `ay app push --help`, `ay daemon start\n--help`\n\n## Examples\n\nThere is an [examples directory](https://github.com/premAI-io/Ayup/tree/main/examples) that contains\nsome applications that are known to work with Ayup.\n\nFor example you can do\n\n```sh\n$ cd $AYUP_SRC/examples/hello-world-flask\n$ ay push\n```\n\nYou can also run it on its self\n\n```sh\n$ cd $AYUP_SRC\n$ ay push\n```\n\nPresently it just produces the help output.\n\n# Development\n\nAyup is a standard Go project and thus easy to build in most environments. However Nix\nis used to provide the reference development and build environment.\n\n1. Install Nix with flakes/\"experimental\" features enabled (e.g. use https://github.com/DeterminateSystems/nix-installer)\n2. `cd Ayup`\n\nThen there is a choice between using the Nix dev shell...\n\n3. `nix develop` (I add `--command fish` to my nix command to use Fish instead of Bash)\n4. `script/gen-src.sh`\n5. `go build -race -o bin/ay ./go`\n6. `./bin` is added to the path by Nix so now you can run `ay`\n\nOr using Nix to build/run the project...\n\n3. `nix run .#server` run the server\n4. `nix run .#cli` run the cli\n\nAlso you don't need to Git clone this project onto a system to run it with Nix. You can run the\nflake from this repo with\n\n`nix run github:premAI-io/Ayup#\u003cserver,cli\u003e`\n\nOr if you want to try out a dev branch\n\n`nix run github:\u003cuser\u003e/\u003crepo\u003e/\u003cbranch\u003e#\u003cserver,cli\u003e`\n\n# Logs and tracing\n\nOpen Telemetry is used to collect ~~logs and~~ traces which requires some kind of collector and UI.\nTo use Jaeger on your local system do\n\n```sh\ndocker run -d --name jaeger \\\n                    -e COLLECTOR_OTLP_ENABLED=true \\\n                    -p 16686:16686 \\\n                    -p 4317:4317 \\\n                    -p 4318:4318 \\\n                    jaegertracing/all-in-one:latest\n```\n\nNote that the collector must support gRPC traces.\n\nAyup only sends traces if the standard environment variable is set\n\n```sh\nOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 ay ...\n```\n\nYou can view the traces at `http://localhost:16686` or wherever the collector/viewer is hosted.\n\nContinuous tracing can be collected with Pyroscope.\n\n```sh\ndocker run -d -p 4040:4040 grafana/pyroscope\n```\n\nAnd the environment var\n\n```sh\nPYROSCOPE_ADHOC_SERVER_ADDRESS=http://localhost:4040 ay ...\n```\n\n# Follow\n\nIf you are interested in following Ayup's development then see [the discussions dev log](https://github.com/premAI-io/Ayup/discussions/categories/announcements)\nor find me (Richard Palethorpe) on social media.\n\n# Contact\n\nThe main point of contact for this project is Richard Palethorpe, richard@premai.io. You can use the discussions, \ne-mail or find me elsewhere with questions, suggestions or feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremai-io%2Fayup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpremai-io%2Fayup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremai-io%2Fayup/lists"}