{"id":23390502,"url":"https://github.com/tty47/axectl","last_synced_at":"2025-04-08T14:20:37.097Z","repository":{"id":107118627,"uuid":"435014530","full_name":"tty47/axectl","owner":"tty47","description":"DevOps/SRE set of tools","archived":false,"fork":false,"pushed_at":"2023-02-24T07:46:43.000Z","size":36668,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T10:43:42.651Z","etag":null,"topics":["devops","go","golang","infrastructure","infrastructure-as-code","infrastructure-management","sre","tooling","tools"],"latest_commit_sha":null,"homepage":"https://github.com/jrmanes/axectl","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/tty47.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":"2021-12-04T21:39:31.000Z","updated_at":"2023-09-25T18:30:23.000Z","dependencies_parsed_at":"2023-03-22T18:05:16.227Z","dependency_job_id":null,"html_url":"https://github.com/tty47/axectl","commit_stats":null,"previous_names":["tty47/axectl","jrmanes/axectl"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Faxectl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Faxectl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Faxectl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tty47%2Faxectl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tty47","download_url":"https://codeload.github.com/tty47/axectl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856550,"owners_count":21007621,"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":["devops","go","golang","infrastructure","infrastructure-as-code","infrastructure-management","sre","tooling","tools"],"created_at":"2024-12-22T03:31:39.011Z","updated_at":"2025-04-08T14:20:37.070Z","avatar_url":"https://github.com/tty47.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# axectl\n\n```bash\n+--------------------------------------------------+\n|                                                  |\n|              .dx:.                               |\n|             cO00Ok;                              |\n|           .x00OOOkkx.                            |\n|          .d00OOOkkkxl                            |\n|         :kOOOOkkkxl;'                            |\n|      .l00OOOkkkxd:;cc'                           |\n|    'd00OOOOkkkdc',:lol,                          |\n|  ,d000OOOkkkxd,..',:loo:                         |\n|.d000OOOkkkxxxl   ..,:codl.                       |\n|xO0OOOkkkxxxxd,      .;cldo;                      |\n|:kkOOkkkxxxddo.        ':codl'                    |\n| ;xxkkxxxdddd:          .,:lddl.                  |\n|  .cxddddddoo.            .;codd;                 |\n|    .:ddooooc               ':lddl'               |\n|       .,clo,                .,coddc.             |\n|                               .:lddo,.           |\n|                                 ,clddl,          |\n|                                  .;lodo:.        |\n|                                    ,clddl,       |\n|                                     .;codoc.     |\n|                                       ':lddo:.   |\n|                                        .;codoc,  |\n|                                         .,:lool:.|\n|                                           .;cloo:|\n|                                            .,:c;.|\n|                                                  |\n|                                                  |\n+--------------------------------------------------+\n```\n---\n\n# Index\n1. [Description](#description)\n2. [Build project](#build_project)\n3. [Sonar](#paragraph2)\n   1. [What it does?](#whatitdoes)\n4. [Examples](#examples)\n5. [Sconar Scanner](#sonar-scanner)\n6. [Add to path](#addtopath)\n7. [TODO](#todo)\n\n---\n\n## This is the introduction \u003ca name=\"introduction\"\u003e\u003c/a\u003e\nSome introduction text, formatted in heading 2 style\n\n## Some paragraph \u003ca name=\"paragraph1\"\u003e\u003c/a\u003e\nThe first paragraph text\n\n\n\n## Description \u003ca name=\"description\"\u003e\u003c/a\u003e\n\n`axectl` is a set of DevOps/SRE tools for developers, we can create different commands to abstract manual tasks.\n\nThis tool is written in [Go](https://go.dev/) with the [cobra](https://github.com/spf13/cobra) framework.\n\nAs result of the project, we obtain a binary which can be compiled for the different platforms and architectures.\n\n---\n\n## Build project \u003ca name=\"build_project\"\u003e\u003c/a\u003e\n\nTo build the project from your side, you need `Go` installed in your computer, and execute:\n\nRemember to check your `OS` and your architecture.\n\n```\nmkdir -p ./bin\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/axectl ./\n```\n\nOr you can go to the releases page.\n\n---\n\n## Sonar \u003ca name=\"sonar\"\u003e\u003c/a\u003e\n\naxectl has the command `sonar` which allows you to setup and configure a **SonarQube** in your local dev env.\n\nThis command is an abstraction to setup and configure the project in **SonarQube**.\n\n### What it does? \u003ca name=\"whatitdoes\"\u003e\u003c/a\u003e\n\nThe CLI with the command `sonar` uses [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) to create the resources needed.\n\nSome [features](#features) are:\n\n- Use three docker containers:`SonarQube`, `PostgreSQL` and `sonar-scanner`.\n  - `SonarQube` -\u003e server\n  - `PostgreSQL` -\u003e database engine\n  - `sonar-scanner` -\u003e tool from Sonar to analyse the code\n- The tool `axectl` communicates to the `SonarQube` API to create the projects and the tokens automatically, the tokens are store in the path `~/.axectl/sonar/token`\n- `axectl` has the flag `-i` which install the needed requirements for you, the requirements are:\n  - docker\n  - docker-compose\n- The flag `-i` also add your user to the `Docker` group.\n- It asks you to restart your computer for changes to take effect.\n\n### Examples \u003ca name=\"examples\"\u003e\u003c/a\u003e\n\n- Install requirements, this step install all the requirements to run `Docker` and the `sonar-scanner` in your computer. [features](#features)\n- After the installation, you will be prompt to restart your computer, this is because is needed after add your user to the `Docker` group [source](https://docs.docker.com/engine/install/linux-postinstall/)\n```bash\naxectl sonar -i\n```\n\n- Start the service, creating the projects and scan them\n```bash\naxectl sonar -s -c --scan -p \"someProject\" -o \"someOrganization\"\n```\n\n- Start the service\n```bash\naxectl sonar -s -p \"someProject\" -o \"someOrganization\"\n```\n\n- Start the service creating the projects\n```bash\naxectl sonar -s -c -p \"someProject\" -o \"someOrganization\"\n```\n\n- Check the status of the service\n```bash\naxectl sonar --status \n```\n\n- Start the SonarQube service\n```bash\naxectl sonar -s\n```\n\n---\n\n### Sonar-scanner Docker \u003ca name=\"sonar-scanner\"\u003e\u003c/a\u003e\n\n\nYou can execute the following command in order to run the analysis directly.\n\n```bash\ndocker run \\\n      --rm \\\n      --network=host \\\n      -e SONAR_HOST_URL=\"http://sonarqube:9000\" \\\n      -v $PWD:/usr/src sonarsource/sonar-scanner-cli \\\n      -Dsonar.projectKey=axectl \\\n      -Dsonar.sonar.projectName=axectl \\\n      -Dsonar.sonar.projectVersion=1.0 \\\n      -Dsonar.scm.disabled=true \\\n      -Dsonar.sources=./ \\\n      -Dsonar.sonar.host.url=http://sonarqube:9000 \\\n      -Dsonar.login=`+token\n```\n\n---\n\n## Add to path \u003ca name=\"addtopath\"\u003e\u003c/a\u003e\n\nYou can easily execute `axectl` anywhere adding the binary to some path that you have configured in your `$PATH`.\n\nYou can use for instance the path:\n`/usr/bin/`\n\nExecute the command:\n```bash\nsudo cp ./axectl /usr/bin/\n```\n\n---\n\n## TODO \u003ca name=\"todo\"\u003e\u003c/a\u003e\n- [x] Install dependencies\n- [x] Start all the containers\n- [x] Check containers status\n- [x] Generate project in Sonar\n- [x] Generate token for project\n- [x] Create config path\n  - [x] Create tokens inside the config path\n  - [x] List tokens\n  - [ ] Delete tokens\n  - [ ] Delete all resources created\n- [x] Setup debug argument\n- [x] Update release from the CLI\n- [x] Remove installation packages for `sonar-scanner`\n- [x] Refactor\n- [ ] Flag to specify the code coverage file\n\n---\n\nJose Ramon Mañes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftty47%2Faxectl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftty47%2Faxectl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftty47%2Faxectl/lists"}