{"id":21012270,"url":"https://github.com/codebanesr/scripts","last_synced_at":"2026-04-29T23:32:21.903Z","repository":{"id":120253952,"uuid":"219363748","full_name":"codebanesr/Scripts","owner":"codebanesr","description":"Some devops tricks to make life of a full stack developer simpler","archived":false,"fork":false,"pushed_at":"2020-05-19T11:53:51.000Z","size":515,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-02T05:00:06.059Z","etag":null,"topics":["aws-ec2","docker","elk-stack","linux","linux-scheduler","linux-scripts","pem","remote-extension","ssh-aliases","ssh-config","ssh-configuration","ssh-key-pair","systemctl","systemctl-command","systemd-service","vscode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebanesr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-11-03T20:50:39.000Z","updated_at":"2023-02-07T19:28:17.000Z","dependencies_parsed_at":"2023-07-27T07:21:23.476Z","dependency_job_id":"a446d5c7-5c89-449f-ba0e-9f6e19350e34","html_url":"https://github.com/codebanesr/Scripts","commit_stats":null,"previous_names":["codebanesr/scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codebanesr/Scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebanesr%2FScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebanesr%2FScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebanesr%2FScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebanesr%2FScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebanesr","download_url":"https://codeload.github.com/codebanesr/Scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebanesr%2FScripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws-ec2","docker","elk-stack","linux","linux-scheduler","linux-scripts","pem","remote-extension","ssh-aliases","ssh-config","ssh-configuration","ssh-key-pair","systemctl","systemctl-command","systemd-service","vscode"],"created_at":"2024-11-19T09:36:04.582Z","updated_at":"2026-04-29T23:32:21.881Z","avatar_url":"https://github.com/codebanesr.png","language":"Shell","readme":"# Tips and solution for redundant devops tasks\n\nContains solutions to some of the problems I encountered while deploying apps to *Amazon machine instances*\n\n## The Docker Folder\ncontains a docker compose file that helps with deployment of the elk stack. ` 🔴Does not have xpack security 🔴`. Use it for quickly setting up the elk stack on your system. It also has an image for portainer for you to easily manage your volumes and images for the elk stack. \n\n##### This will expose the following ports on you machine\n\n```\n- \"5601:5601\" -\u003e elastic\n- \"9200:9200\" -\u003e kibana\n- \"5044:5044\" -\u003e logstash\n\n- 9000:9000  -\u003e Portainer\n- 8000:8000\n```\n\n## Usage\n\u003eNavigate to the folder containing the compose file. Then run the following command\n\n```\ndocker-compose up -d --build\n``` \n\u003e In case you only want to run a single image, lets say you wanted to rebuild portainer\n\u003e \n```\ndocker-compose up -d --build --no-deps portainer\n```\n##### This will build the entire stack, navigate to localhost:9000, this is where portainer is running, and you can verify that the stack is built up correctly\n\n\n\nPlease make sure to update tests as appropriate.\n\n\n#### The nginx folder contains the advanced logging for nginx, which I used primarily to log the output of `x-real-ip` and `x-forwarded-for` to track the ip addresses of the incoming request\n\n## The ssh config directory\n` ssh-config directory in this project contains a guide to include your aws-ec2 pem files in your ssh-configs, so that you don't have to manually enter entire configuration to log in to your remote system.  At the end of this you will be able to ssh using a single line of code, which can be optimised to your taste. The ssh-config file contains comments to make the installation simpler.  `\n\n- Host is an alias you give to your connection\n- Hostname can be an ip or domain name for your ec2-instance\n- Identity is the location of .pem file\n- User is the default user for remote instance [mine is amazon linux, the default user for linux ami is ec2-user, yours may be called root]\n\n### Usage Example\n```\n    cd ~/.ssh\n    nano ssh-config\n    \n    Host test.elasticsearch.marsplay\n    HostName test.marsplay.co\n    IdentityFile ~/.ssh/EC2_SSH_KEYS/Test_Elastic.pem\n    User ec2-user\n```\n`Be sure to include the correct path for your .pem file, mine happened to be a folder named EC2_SSH_KEYS inside the .ssh directory . Run the following command `\n\n* ``` ssh test.elastic.marsplay ``` \nyou will be connected to your remote system\n\n\n\u003e You may also like the vscode extension that allows you to access your instances via the connections you just mentioned in your ssh-config file. I'll leave it up to you to figure out 😉\n![Image of vscode](/ssh-configs/Screenshot\u0026#32;2019-11-04\u0026#32;at\u0026#32;2.27.03\u0026#32;AM.png)\n\n\u003e![Image of vscode](/ssh-configs/Screenshot\u0026#32;2019-11-04\u0026#32;at\u0026#32;2.27.19\u0026#32;AM.png)\n\n\n\n## The systemd directory\nThe systemd directory contains a systemd configuration file that restarts the docker-compose stack on a system reboot automatically\n\n` Dont forget to enable the docker daemon on your system first `\n```\nsudo systemctl enable docker\n```\n\u003e This will create a symlink for the docker daemon into the bin directory, so that docker starts on system reboot\n\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebanesr%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebanesr%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebanesr%2Fscripts/lists"}