{"id":20136085,"url":"https://github.com/zkfmapf123/ecs-master","last_synced_at":"2025-08-28T19:18:20.947Z","repository":{"id":174689586,"uuid":"624287809","full_name":"zkfmapf123/ecs-master","owner":"zkfmapf123","description":"ecs use terraform ","archived":false,"fork":false,"pushed_at":"2023-07-01T03:29:46.000Z","size":14163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T09:38:25.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/zkfmapf123.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-06T06:25:23.000Z","updated_at":"2023-06-18T15:25:57.000Z","dependencies_parsed_at":"2023-07-11T07:15:41.126Z","dependency_job_id":null,"html_url":"https://github.com/zkfmapf123/ecs-master","commit_stats":null,"previous_names":["zkfmapf123/ecs-master"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fecs-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fecs-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fecs-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fecs-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkfmapf123","download_url":"https://codeload.github.com/zkfmapf123/ecs-master/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582521,"owners_count":19985846,"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":[],"created_at":"2024-11-13T21:17:40.195Z","updated_at":"2025-03-02T22:42:08.106Z","avatar_url":"https://github.com/zkfmapf123.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECS use Terraform\n\n## ECS Architecture\n\n![archi](./public/archi.png)\n\n- ECS\n\n  - Container를 Orchestration해주는 Tool\n  - 이러한 EC2 Container 들을 ECS Cluster가 관리한다 (배포, 생성)\n  - EC2 Service들은 Auto Scaling을 처리한다\n\n- ECS Launch Option\n\n  - Fargate\n\n    - Serverless\n    - Container에서 사용한 CPU와 Memory 사용량의 대해서만 비용측정\n    - 좀더 비싸지만 -\u003e 규칙이 일정하지 않은 Traffic System은 Fargate 비용적으로 더 좋은 제안\n    - Serverlss인 만큼 -\u003e Server에 직접 접근해서 Trouble Shooting이 불가능\n\n  - EC2 Type\n    - 그냥 EC2 + Auto Scaling\n\n## Jenkins Docker 설치\n\n- docker 설치 ubuntu\n\n```\n  sudo apt-get update\n\nsudo apt-get install -y \\\n ca-certificates \\\n curl \\\n gnupg \\\n lsb-release\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n\necho \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n\nsudo apt-get update\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io\n\ndocker verision\n```\n\n- user, group 추가\n\n```\n  sudo groupadd -g \u003cdocker-group-id\u003e docker_group\n  sudo useradd -u 1000 -g \u003cdocker-group-id\u003e -m -s /bin/bash docker_user\n```\n\n- Docker volume 추가\n\n```\n  chmod 777 /var/run/docker.sock\n  docker volume create jenkins_file\n```\n\n- Dockerfile 실행\n\n```Dockerfile\n\n## Dockerfile.jenkins\nFROM jenkins/jenkins:lts\n\nUSER root\n\nRUN apt-get update \\\n \u0026\u0026 apt-get -y install lsb-release \\\n \u0026\u0026 curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \\\n \u0026\u0026 echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable\" | tee /etc/apt/sources.list.d/docker.list \u003e /dev/null \\\n \u0026\u0026 apt-get update \\\n \u0026\u0026 apt-get -y install docker-ce docker-ce-cli containerd.io\n\n## if user_id = 1111\n## if group_id = 1111\n## ARG 형태로 진행해도 됨\n\nRUN usermod -u 1111 jenkins \u0026\u0026 \\\n    groupmod -g 1111 docker \u0026\u0026 \\\n    usermod -aG docker jenkins\n\nUSER jenkins\n```\n\n- Docker run\n\n```\ndocker build -f Dockerfile.jenkins -t jenkins .\n\ndocker run \\\n-d \\\n--name jenkins_container \\\n-p 8080:8080 \\\n-v jenkins_file:/var/jenkins_home \\\n--restart always \\\njenkins\n```\n\n## Reference\n\n![Jenkins_branch](./server/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fecs-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkfmapf123%2Fecs-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fecs-master/lists"}