Skip to content

Commit

Permalink
Update README with cda. Repositories Management System details.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cdaprod committed Mar 9, 2024
1 parent ec48c90 commit b00b743
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 5 deletions.
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,30 @@ Centralized deployment.
[![Test GitHubAPI Class](https://github.com/Cdaprod/cda.REPOS/actions/workflows/test_github_api.yaml/badge.svg)](https://github.com/Cdaprod/cda.REPOS/actions/workflows/test_github_api.yaml)
[![Test cda_repos.py Arguments with Dry Run](https://github.com/Cdaprod/cda.REPOS/actions/workflows/test_cda_repos_py.yaml/badge.svg)](https://github.com/Cdaprod/cda.REPOS/actions/workflows/test_cda_repos_py.yaml)

## Needed Solutions:
# `cda.` Repositories Management System README

## Overview
This system offers flexible management of `cda.` GitHub repositories, allowing for both stateful and stateless interactions. Utilizing the `cda_repos.py` script, users can either maintain a local copy of repositories (stateful) or interact with them on-the-fly without retaining a local state (stateless).

### Agent that:
### Stateful Environment
- **Local Cloning**: Creates a local, persistent copy of repositories.
- **State File Generation**: Generates a JSON state file to track repository structure and metadata.
- **Regular Synchronization**: Keeps the local environment updated with changes from GitHub.

### Stateless Environment
- **Ephemeral Interaction**: Manages repositories for one-time operations, with no local state persistence.
- **CI/CD Integration**: Suitable for CI/CD pipelines, where operations are performed in temporary environments.
- **Resource Optimization**: Minimizes the need for local storage and state management.

### Usage
- Define operational mode: Stateful for persistent local management, Stateless for ephemeral interactions.
- Utilize the script for repository cloning, data fetching, and analysis based on the selected mode.
- Integrate into development workflows or automated systems as required.


# Needed Solutions:

# Agent that:

- [ ] writes pythonista keyboard shortcuts and integrations via python scripts stored on icloud://pythonista/keyboard_scripts/.
- [ ] creates ios shortcuts using docker selenium on macbook
Expand All @@ -15,14 +35,30 @@ Centralized deployment.

## Variables to set:

```
```plaintext
DATASTORE=
MINIO_URL=
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
WEAVIATE_URL=
API_BASE=
API_KEY=
```


The script supports arguments to specify the runner (frontend, backend, api) or an individual service, and also includes a dry-run mode for testing without actual cloning.

## Key features and functionalities:

1. Dynamic Repository Fetching: Based on the runner type, it dynamically fetches repository lists from a specific directory structure.
2. GitHub API Interaction: Uses a custom GitHubAPI class to interact with the GitHub API for fetching repository details.
3. Repository Cloning: Capable of cloning repositories to the local environment.
4. Data Serialization: Generates JSON files containing repository data and build structures.
5. Command-line Interface: Includes argparse to provide a CLI for user interaction.

Automating the deployment and management of repositories for different self-hosted matrix's (frontend, backend, api).

The script emphasizes modularity and automation in handling GitHub repositories.


### Conclusion
This system is versatile, catering to diverse needs - from development to deployment - offering efficient management of `cda.` repositories.
28 changes: 28 additions & 0 deletions runner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# GitHub Actions Self-Hosted Runner Dockerfile

## Overview
This Dockerfile configures a self-hosted runner for GitHub Actions. It is based on Ubuntu and includes necessary tools like `curl`, `sudo`, `git`, and `jq`.

## Usage
1. **Build the Docker Image**:
- Use `docker build` with the necessary build arguments (`REPO_URL` and `RUNNER_TOKEN`).
2. **Run the Container**:
- Deploy the container in your environment, and it will connect to the specified GitHub repository as a runner.

## Building the Image
```bash
docker build -t github-runner --build-arg REPO_URL=<your-repo-url> --build-arg RUNNER_TOKEN=<your-runner-token> .

Deploying the Runner

Run the container using:

docker run -d --name my-runner github-runner

Customization

You can modify the Dockerfile to include additional dependencies or configurations as needed for your CI/CD tasks.

Author

Created by Cdaprod

0 comments on commit b00b743

Please sign in to comment.