(Optional) Deploy the Sample Application
Configure AWS SaaS Boost for the Sample Application
Just as you would configure AWS SaaS Boost to support the requirements of your application, we must configure the application settings properly for this sample app. This sample application relies on the following configuration in AWS SaaS Boost.
AWS SaaS Boost 를 당신의 요구사항에 맞추어 환경설정을 합니다. Sample 어플리케이션은 아래와 같은 의존성이 있습니다.
보아하니, Health Check경로, 서비스 포트, 컨테이너에 마운트할 포인트, DB접속정보, 인증서 등 입니다.
- Enter a friendly name Name for the application such as Sample
- Create a New Service and give it a name such as main
- Make sure the Publicly accessible box is checked
- Make sure the Service Addressible Path is /*
- In the Compute section: - For Container OS, select Linux - Set the Container Tag to latest - Set the Container Port to 8080 - Set the Health Check URL to /index.html
- In the Filesystem section: - Enable the Provision a File System for the application checkbox and select EFS - Set the Mount point to /mnt
- In the Database section: - Enable the Provision a database for the application checkbox - Select any of the available databases (MariaDB with a db.t3.micro instance class will probably provision the fastest) - Enter a Database Name, Username, and Password. You do not need to provide a SQL file for database initialization.
- Under the default Tier settings: - Set Compute Size to Medium - Minimum Instance Count and Maximum Instance Count can be 1 and 1 respectively - Select the db.t3.micro instance class for your Database.
Your config should look similar to the following:
Build and Deploy the Sample Application
Once you have saved your Application Setup, SaaS Boost will create an ECR repo for each defined service in your application. Once CloudFormation has finished updating your SaaS Boost install you can build and containerize the sample application. To create a Docker image of this sample application, you will need to have Docker running on your local machine. Navigate to the samples/java/ directory in your clone of the AWS SaaS Boost repo and execute the build script which will build, containerize, and push your containerized application to the AWS SaaS Boost ECR repository. You can review the steps in this example shell script to see how you might enhance your current build process for your application to integrate with AWS SaaS Boost.
어플리케이션 환경설정이 끝나면, SaaS Boost는 ECR Repository에 각 어플리케이션 Repository를 자동으로 등록합니다. (이건 CloudFormation에서 자동으로 돌아갑니다.) 이제는 해당 Container Repository에 당신의 Local Machine에서 Docker Build해서 올립니다.
cd aws-saas-boost/samples/java
sh build.sh
This script prompts you for your AWS SaaS Boost environment. Enter the environment label that you specified when you ran the AWS SaaS Boost installer. The script will then prompt you for the name of the service you're building. In this example, use main. Note that service names are case-sensitive. When this script finishes, you have published your application service to the AWS SaaS Boost application repository. As you make changes to the application, you can execute the build script again to update your application.
For multi service applications, you'd repeat the same steps for each service you configure.
이 스크립트는 당신의 SaaS Boost 환경에대한 프롬프트를 보여줍니다. 이때 배포하려는 환경에 대한 Lable명을 입력해주세요.(해당 Label 명은 SaaS Boost install할때 적용한 라벨입니다.) 그리고 이 프롬프트는 당신에게 빌드/배포할 서비스 이름을 물어볼것입니다. 이때 대소문자 구분잘해주세요. 이 스크립트가 완료되면 당신은 SaaS Boost Repository에 배포를 완료한 상태입니다. 멀티 서비스 어플리케이션이라면 이작업을 반복해야 합니다.
Onboard a Tenant
You can now onboard a new tenant which will provision all the necessary infrastructure to support your applicaiton and deploy all of the services you've configured. Navigate to the Onboarding page of the administration application and click the Provision Tenant button. Once the onboarding process completes, you'll be able to access that tenant's instance of the sample application by navigating to the Tenants page of the administration application, then go to the tenant detail page, and finally clicking on the Load Balancer DNS link.
이제 당신은 새로운 테넌트에 프로비저닝 할 수 있습니다.
The last piece of the onboarding flow is to deploy an application to the new tenant environment. This deployment uses the containerized image that you uploaded to Amazon ECR and deploys it to the Amazon ECS cluster that was created during the provisioning of the tenant environment.
처음 테넌트 환경에 배포할때는 Code Pipeline을 사용한다.
Deploying Application Updates
After your environment is running and you've onboarded a few tenants, the next area that teams will focus on is the deployment of application updates. Deployment of these updates is especially important in SaaS environments where each new release is deployed to all the tenants of your system. SaaS Boost handles this entire deployment lifecycle, publishing each new version as a rolling update to all of your tenant environments.
몇몇 테넌트에서 onBoard했으면, 추후에 계속 수정보완하게 될것이다. SaaS Boost는 전반적인 배포 라이프사이클을 관장한다.
Figure 14 - Deploying application updates
Figure 14 provides a high-level view of the deployment process. Note that each application update is packaged as a containerized application and uploaded to the SaaS Boost instance of Amazon ECR.
When SaaS Boost detects a newly uploaded image, it triggers the applicable update process as part of a rolling update to each tenant's environment. This removes the heavy lifting from the DevOps pipeline and pushes the responsibility to SaaS Boost.
SaaS Boost가 새로운 이미지가 등록됨을 감지하면 이건 자동적으로 Trigger된다.
'PaaS > CI CD' 카테고리의 다른 글
Github과 Gitlab의 리소스 비교 (0) | 2023.11.08 |
---|---|
Github Actions 설정 (0) | 2023.11.07 |
git 비밀번호 저장 (0) | 2023.03.06 |
Gitlab Runner 사용법 (0) | 2023.01.13 |
Nexus Repository 이관하기 (0) | 2022.10.05 |