본문 바로가기
반응형

[AWS]/GITLAB72

15: GitLab CI Deploy to Remote Server over SSH 15:GitLab CI Deploy to Remote Server over SSH |Deploy Code to AWS EC2 Instance using SSH with GitLab https://www.fosstechnix.com/gitlab-ci-deploy-to-ec2-using-ssh/ GitLab CI Deploy to EC2 using SSH GitLab CI Deploy to EC2 using SSH | GitLab CI Deploy to Remote Server | Deploy Code to AWS EC2 Instance using SSH with GitLab CI/CD Pipeline www.fosstechnix.com stages: - deploy #In this we have only .. 2022. 3. 4.
sed 명령어 build: stage: build image: openjdk:12-alpine script: - sed -i "s/CI_PIPELINE_IID/$CI_PIPELINE_IID/" ./src/main/resources/application.yml - sed -i "s/CI_COMMIT_SHORT_SHA/$CI_COMMIT_SHORT_SHA/" ./src/main/resources/application.yml - sed -i "s/CI_COMMIT_BRANCH/$CI_COMMIT_BRANCH/" ./src/main/resources/application.yml - ./gradlew build - mv ./build/libs/cars-api.jar ./build/libs/$ARTIFACT_NAME artifa.. 2022. 3. 2.
65장. Assignment solution (오류 해결) ## gitlabci 계정 AWSElasticBeanstalk 정책 추가 ## .gitlab-ci.yml variables: ARTIFACT_NAME: cars-api-v$CI_PIPELINE_IID.jar APP_NAME: cars-api stages: - build - test - deploy build: stage: build image: openjdk:12-alpine script: - ./gradlew build - mv ./build/libs/cars-api.jar ./build/libs/$ARTIFACT_NAME artifacts: paths: - ./build/libs/ smoke test: stage: test image: openjdk:12-alpine before_script: - a.. 2022. 3. 2.
63장. AWS CLI를 사용하여 AWS Elastic Beanstalk에 Java 애플리케이션을 배포하는 방법 ## ElasticBeanstalk CLI 명령어 https://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/ elasticbeanstalk — AWS CLI 1.22.64 Command Reference Note: You are viewing the documentation for an older major version of the AWS CLI (version 1). AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click h.. 2022. 3. 2.
62장. GitLab CI에서 AWS S3로 파일을 업로드하는 방법 ## S3 CLI 명령어 https://docs.aws.amazon.com/cli/latest/reference/s3/ s3 — AWS CLI 1.22.64 Command Reference Note: You are viewing the documentation for an older major version of the AWS CLI (version 1). AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. F docs.aws.amazon.com ## Gitlab 용 CLI.. 2022. 3. 1.
[AWS] GitLab CICD Pipelines with AWS EC2 and S3 https://www.youtube.com/watch?v=ab3Fca1HeEI 2022. 2. 28.
61장. GitLab 그룹 설정 ## cars-oky-test 버킷 생성 ## 깃랩 그룹 생성 - gitlab-course-oky - 그룹내 CI/CD --> Variables 에서 버킷 변수 지정 (그룹내 타프로젝트와 공유 가능) ================================== Because we want to use this service in Vietnam, it would make sense to copy his name and put it in a variable, wanted to point out that you can organize project in Gottleib in groups. Organizing project in groups has some advantages, for example, we c.. 2022. 2. 24.
60장. AWS S3 시작하기 ## 퍼블릭 엑세스 차단 후, 생성 https://aws.amazon.com/ko/s3/ 클라우드 스토리지 | 웹 스토리지| Amazon Web Services aws.amazon.com ================================= Let's go back to the AWB management console. And from here, we're going to go to all services in case this isn't opened, and we said that we want to use the S3 service and we'll find that under storage. You want to get started with us three, we need to create.. 2022. 2. 24.
59장. GitLab CI에서 AWS로 배포하는 방법 ## CLI 이용시 - Jar 파일 곧바로 Elastic Beanstalk 업로드 불가 (S3 활용 필요) ================================= Now, we have mainly deployed a job application and it's running into a w cloud infrastructure, but our goal of automation is to avoid any manual interaction. So we need to figure out a way how we can deploy our job application in the cloud directly from catalepsy. In order to do that, we have to follow .. 2022. 2. 24.
58장. AWS에 배포하는 방법(수동 업로드) - Elastic Beanstalk ## Elastic Beanstalk --> 애플리케이션 생성 - .jar 파일 수동 업로드 배포 성공 ## GUI 환경이 아니므로, Postman 에서 설정후, 테스트 ============================================== So let's get started using the A.W. has been stopped from the AWB management console. You can either search for service here or click on all services you'll see to the list of services is quite long. What we are needing is computing power. So for that reas.. 2022. 2. 24.
57장. AWS Elastic Beanstalk를 사용한 서버리스 컴퓨팅 ## JAVA, PHP, Docker, Node 개발소스 가능 Even if you use a cloud provider like Adewusi, you can still rent, to put it like that, a virtual machine that has a dedicated CPU memory and disk space. But this also means that you need to handle software updates or backups or handle any softer issues that may occur and that make your application run unstable. The U.S. Lastic Bienstock is a way to deploy an a.. 2022. 2. 23.
55장. Amazon Web Services(AWS)에 대한 간략한 소개 Amazon Web Services, or simply AWG, is a cloud platform offering over 170 services available in data centers all over the world. Such services include virtual servers, manage databases, file storage, content delivery and many others. Well, this section focuses on AWG, the principles presented here apply to any other providers. If you don't already have an AWB account, it's quite easy to create o.. 2022. 2. 23.
54장. CI/CD 파이프라인 요약 ===================================== Now we have an artifact or a package of software, we have tested it and we are ready for deployment. So what to do next? We want to have this somewhere where a client, either from a mobile app or from a web location, can access this car information to displayed for the end users. That leads to opposite direction in which you can go if you want to deploy some.. 2022. 2. 22.
53장. 테스트 단계 : Adding a smoke test (기초테스트) script: - java -jar ./build/libs/cars-api.jar & - sleep 30 - curl http://localhost:5000/actuator/health | grep "UP" ## Postman 에서 정보 확인 ## .gitlab-ci.yml stages: - build - test build: stage: build image: openjdk:12-alpine script: - ./gradlew build artifacts: paths: - ./build/libs/ smoke test: stage: test image: openjdk:12-alpine before_script: - apk --no-cache add curl script: - java -jar ./buil.. 2022. 2. 22.
52. 빌드 단계: Gitlab CI로 Java 애플리케이션 빌드 ## IntelliJ 에서 .gitlab-ci.yml 생성 후, 빌드 -> Jar 파일 생성 ## .gitlab-ci.yml stages: - build build: stage: build image: openjdk:12-alpine script: - ./gradlew build artifacts: paths: - ./build/libs/ ===================================================== Now that we know which command is responsible for building this type of project, it's not time to start building the catalepsy pipeline. So what I'm goin.. 2022. 2. 22.
51장. 빌드 단계: 로컬에서 Java 애플리케이션 빌드 ## CMD 빌드 방법 ## GUI 빌드 방법 (build - libs - cars-api.jar 파일 생성) ## GUI Clean 방법 (cars-api.jar 파일 삭제) ## 하기 내용시 재부팅 할것!! ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. ## Gradle이란 무엇입니까? 개요 Gradle은 거의 모든 유형의 소프트웨어를 빌드할 수 있을 만큼 충분히 유연하도록 설계된 오픈 소스 빌드 자동화 도구입니다. 다음은 가.. 2022. 2. 21.
50장. 지속적 통합(CI) 파이프라인 개요 ====================================== We are ready to start building a pipeline for this project, and the first step is to start with the pipeline, obviously, because we first are trying to build something and after that we are trying to deploy it. If you remember, the pipeline typically has a few stages like build code, quality test and packaging the application for later use, especially for d.. 2022. 2. 21.
49장. Postman으로 API 호출하기 ## Import 로 Json 오픈, Localhost 로 설정 - CRUD 테스트 - 브라우저 조회가능 http://localhost:5000/cars https://www.youtube.com/watch?v=JzpFsrZnNDo http://pizzeria-valentino.herokuapp.com/api/orders http://pizzeria-valentino.herokuapp.com/api/auth =============================================== So after opening Posman, I will go to import. And are two files that need importing, the first one is the collection, th.. 2022. 2. 21.
48장. 자바 애플리케이션 소개 ## Gitlab 프로젝트 생성 https://gitlab.com/gitlab-course-public/cars-api gitlab-course-public / cars-api GitLab.com gitlab.com ## API란? API는 웹사이트와 같은 그래픽 인터페이스가 없는 프로그램입니다. 예를 들어 API는 프론트 엔드 애플리케이션 또는 모바일 애플리케이션에서 프로세스 또는 프로세스에서 데이터를 표시하는 데 사용됩니다. https://www.youtube.com/watch?v=iFMLyMgCUTs ## 사전 설치 개발 툴 https://www.jetbrains.com/idea/download/download-thanks.html?platform=windows&code=IIC Thank you f.. 2022. 2. 21.
47. Overview (Deploy JAVA To AWS Elastic Beanstalk) In this section, we increase the complexity of the application we are building and deploying, we'll be building and testing a job application and will deploy to Amazon Web Services, also known as a W.S. Anderson. If you're not a Java developer or you are not interested in using Java or A.W. with your projects, this section tries to provide you with a realistic example. I can assure you it is tot.. 2022. 2. 21.
46장. ​​작업 템플릿 만들기 ## .deploy_template 생성 후, - deploy staging, deploy production 상속 ## .gitlab-ci.yml image: node stages: - build - test - deploy review - deploy staging - deploy production - production tests cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ variables: STAGING_DOMAIN: aido-stg.surge.sh PRODUCTION_DOMAIN: aido-pro.surge.sh build website: stage: build only: - master - merge_requests script: -.. 2022. 2. 21.
45장. Anchors ## Anchors 활용 - 중복 콘텐츠 방지 - 다른 개체의 속성을 상속 https://codebeautify.org/yaml-to-json-xml-csv Best Online YAML Converter - Convert YAML Strings into JSON, XML, CSV codebeautify.org ====================================================== Yambo has a very nice feature called Anker's in the beginning, it does seem a bit weird to use it, but in this lecture I would try to explain you what anchors are, how .. 2022. 2. 21.
44. 작업 비활성화 ## 작업 비활성화시, 앞에 콤마(.) 생성 - 이전 단계의 종속성에 의존하지 않는다면 단순히 작업을 비활성화할 수 있습니다. .build website: .test artifact: ================================================= Sometimes you only may want to work on some specific jobs or in some specific stages, and when you're working on a specific stage, especially if it's towards the end, you don't really want for the entire thing to build and take so much time. So .. 2022. 2. 21.
43장. YAML 이해하기 ## YAML 이해하기 - 키와 값의 쌍 - 문자, 숫자 설정 가능 - True, False 설정 가능 - 목록 (List), 배열 (Array) 설정 가능 - 주석 (#) 허용 - JSON 은 주석 불가 - JSON 변환시 -----> List 도 Array 로 변경됨 person: name: John age: 29 isMale: true stuff: - laptop - car - bike food: [pizza, donuts, coke] friends: - name: Jane age: 19 - name: mike age: 22 { "person": { "name": "John", "age": 29, "isMale": true, "stuff": [ "laptop", "car", "bike" ], "fo.. 2022. 2. 21.
42장. YAML Overview Welcome to this new section where we will discuss Yamal Basics now the entire section is designed to give you an introduction to Yamal because so far we have used Yamal, but only just to help us to write the configuration that we needed. And we haven't really looked at what the angle is and how everything works together and why we have to write some things the way we have written them. So the id.. 2022. 2. 21.
41장. 요약 및 결론 Congratulation, this is the last lecture in dissection and yeah, I think we have done a good job because now we have gone over the most important features that get lab and get Lipsey offer us. I think one of the key takeaways in this one is especially related to environments and how we have to use them and that we have now the possibility of doing my request, deploying to dynamic environments, d.. 2022. 2. 21.
40장. before_script 및 after_script 구성 ## before_script 선택적 옵션 ## .gitlab-ci.yml image: node stages: - build - test - deploy review - deploy staging - deploy production - production tests cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ variables: STAGING_DOMAIN: aido-stg.surge.sh PRODUCTION_DOMAIN: aido-pro.surge.sh build website: stage: build only: - master - merge_requests script: - echo $CI_COMMIT_SHORT_SHA - npm install .. 2022. 2. 21.
39장. Destroying environments (Clean-up after the Merge Request) ## Master 로 Merge 진행시, 기존 Branch의 테스트 주소 삭제 작업 진행 ## .gitlab-ci.yml image: node stages: - build - test - deploy review - deploy staging - deploy production - production tests cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ variables: STAGING_DOMAIN: aido-stg.surge.sh PRODUCTION_DOMAIN: aido-pro.surge.sh build website: stage: build only: - master - merge_requests script: - echo $CI_COMMI.. 2022. 2. 21.
38장. 사용할 수 없는 환경 변수 문제 해결 Troubleshooting environment variables not being available Problem: Surge is not deploying. This solution is relevant if you are getting this message on the console output. The most likely cause for this is the environment variables not being available inside this branch. You can make sure this is the cause by using the echo command in your script. test job: script: - echo $SURGE_LOGIN Possible s.. 2022. 2. 20.
37장. Dynamic environments ## Deploy Review Job 추가 생성 - Branch 에서 소스변경 (feature/oky) - Master 로 Merge Requests 클릭 ## .gitlab-ci.yml image: node stages: - build - test - deploy review - deploy staging - deploy production - production tests cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ variables: STAGING_DOMAIN: aido-stg.surge.sh PRODUCTION_DOMAIN: aido-pro.surge.sh build website: stage: build only: - master - me.. 2022. 2. 20.
반응형