

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 오픈소스 도구를 사용하여 SAP 시스템을 자동으로 설치
<a name="install-sap-systems-automatically-by-using-open-source-tools"></a>

*Guilherme Sesterheim, Amazon Web Services*

## 요약
<a name="install-sap-systems-automatically-by-using-open-source-tools-summary"></a>

이 패턴은 오픈소스 도구를 사용하여 다음 리소스를 생성함으로써 SAP 시스템 설치를 자동화하는 방법을 보여줍니다.
+ SAP S/4HANA 1909 데이터베이스
+ SAP ABAP Central Services(ASCS) 인스턴스
+ SAP Primary Application Server(PAS) 인스턴스

HashiCorp Terraform은 SAP 시스템의 인프라를 생성하고 Ansible은 운영 체제(OS)를 구성하며 SAP 애플리케이션을 설치합니다. Jenkins는 설치를 실행합니다.

이 설정은 SAP 시스템 설치를 반복 가능한 프로세스로 바꾸어 배포 효율성과 품질을 높이는 데 도움이 될 수 있습니다.

**참고**  
이 패턴에 제공된 예제 코드는 고가용성(HA) 시스템과 비 HA 시스템 모두에서 작동합니다.

## 사전 조건 및 제한 사항
<a name="install-sap-systems-automatically-by-using-open-source-tools-prereqs"></a>

**사전 조건 **
+ 활성 상태의 AWS 계정
+ 모든 SAP 미디어 파일이 포함된 Amazon Simple Storage Service(S3) 버킷
+ [액세스 키와 비밀 키](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)가 있는 Identity and Access Management(IAM) 보안 주체는 다음과 같은 권한을 가집니다.
  + **읽기 전용 권한:** Amazon Route 53, Key Management Service(KMS)
  + **읽기 및 쓰기 권한:** Amazon S3, Amazon Elastic Compute Cloud(Amazon EC2), Amazon Elastic File System(Amazon EFS), IAM, Amazon CloudWatch, Amazon DynamoDB
+ Route 53 [프라이빗 호스팅 영역](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html)
+ Amazon Marketplace에서 [HA 및 업데이트 서비스 8.2](https://aws.amazon.com/marketplace/pp/prodview-5grz5a5thx7c2) Amazon Machine Image(AMI)가 있는 SAP용 Red Hat Enterprise Linux에 대한 구독
+ [KMS 고객 관리형 키](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#aws-managed-customer-managed-keys)
+ [Secure Shell(SSH) 키 페어](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+ Jenkins를 설치하는 곳의 호스트 이름을 통해 포트 22의 SSH 연결을 허용하는 [Amazon EC2 보안 그룹](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html)(호스트 이름은 **localhost**일 가능성이 높음)
+ HashiCorp의 [Vagrant](https://www.vagrantup.com/) 설치 및 구성
+ Oracle의 [VirtualBox](https://www.virtualbox.org/) 설치 및 구성
+ Git, Terraform, Ansible, Jenkins에 대한 익숙함

**제한 사항 **
+ SAP S/4HANA 1909가 이 특정 시나리오에 대한 완전한 테스트를 거쳤습니다. 다른 버전의 SAP HANA를 사용하는 경우 이 패턴의 예제 Ansible 코드를 수정해야 합니다.
+ 이 패턴의 예제 절차는 Mac OS 및 Linux 운영 체제에서 작동합니다. 일부 명령은 Unix 기반 터미널에서만 실행할 수 있습니다. 하지만 각기 다른 명령과 Windows OS를 사용하면 비슷한 결과를 얻을 수 있습니다.

**제품 버전**
+ SAP S/4HANA 1909
+ Red Hat Enterprise Linux (RHEL) 8.2 이상 버전

## 아키텍처
<a name="install-sap-systems-automatically-by-using-open-source-tools-architecture"></a>

다음 다이어그램은 오픈소스 도구를 사용하여 계정에서 SAP 시스템 설치를 자동화하는 예제 워크플로를 보여 줍니다.

![다음 다이어그램은 오픈소스 도구를 사용하여 계정에서 SAP 시스템 설치를 자동화하는 워크플로 예.](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/images/pattern-img/aaf11dac-38cc-4e89-be86-51d4409cf238/images/d7902f9d-f1be-461f-b69b-cf3c663c8f2f.png)


이 다이어그램은 다음 워크플로를 보여줍니다.

1. Jenkins는 Terraform 및 Ansible 코드를 실행하여 SAP 시스템 설치 실행을 오케스트레이션합니다.

1. Terraform 코드는 SAP 시스템의 인프라를 빌드합니다.

1. Ansible 코드는 OS를 구성하고 SAP 애플리케이션을 설치합니다.

1. 정의된 사전 조건을 모두 포함하는 SAP S/4HANA 1909 데이터베이스, ASCS 인스턴스 및 PAS 인스턴스가 Amazon EC2 인스턴스에 설치됩니다.

**참고**  
이 패턴의 예제 설정은 Terraform 상태 파일을 저장하기 위해 계정에 Amazon S3 버킷을 자동으로 생성합니다.

**기술 스택**
+ Terraform
+ Ansible
+ Jenkins
+ SAP S/4HANA 1909 데이터베이스
+ SAP ASCS 인스턴스
+ SAP PAS 인스턴스
+ Amazon EC2 

## 도구
<a name="install-sap-systems-automatically-by-using-open-source-tools-tools"></a>

**서비스**
+ [Amazon Elastic Compute Cloud(Amazon EC2)](https://docs.aws.amazon.com/ec2/?id=docs_gateway)는 AWS 클라우드에서 규모를 조정할 수 있는 컴퓨팅 용량을 제공합니다. 필요한 만큼 많은 가상 서버를 시작하고 빠르게 규모를 확장 또는 축소할 수 있습니다.
+ [Identity and Access Management(IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html)를 사용하여 리소스에 대한 액세스를 안전하게 제어할 수 있습니다.
+ [Key Management Service(AWS KMS)](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html)를 사용하면 암호화 키를 생성하고 제어하여 데이터를 보호할 수 있습니다.
+ [Amazon Virtual Private Cloud(VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html)를 이용하면 사용자가 정의한 가상 네트워크로 AWS 리소스를 시작할 수 있습니다. 이 가상 네트워크는 사용자의 자체 데이터 센터에서 운영하는 기존 네트워크와 유사하며 AWS의 확장 가능한 인프라를 사용한다는 이점이 있습니다.

**기타 도구**
+ [HashiCorp Terraform](https://www.terraform.io/docs)은 코드를 사용하여 클라우드 인프라 및 리소스를 프로비저닝하고 관리하는 데 도움이 되는 명령줄 인터페이스 애플리케이션입니다.
+ [Ansible](https://www.ansible.com/)은 애플리케이션, 구성 및 IT 인프라를 자동화하는 데 도움이 되는 코드형 오픈소스 구성(CaC) 도구입니다.
+ [Jenkins](https://www.jenkins.io/)는 개발자가 그의 소프트웨어를 빌드, 테스트 및 배포할 수 있는 오픈 소스 자동화 서버입니다.

**코드**

이 패턴의 코드는 GitHub [aws-install-sap-with-jenkins-ansible](https://github.com/aws-samples/aws-install-sap-with-jenkins-ansible) 리포지토리에서 사용할 수 있습니다.

## 에픽
<a name="install-sap-systems-automatically-by-using-open-source-tools-epics"></a>

### 필수 구성 요소 구성
<a name="configure-the-prerequisites"></a>


| 작업 | 설명 | 필요한 기술 | 
| --- | --- | --- | 
| SAP 미디어 파일을 Amazon S3 버킷에 추가합니다. | 모든 SAP 미디어 파일이 포함된[Amazon S3 버킷을 생성](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html)합니다.[Launch Wizard 설명서](https://docs.aws.amazon.com/launchwizard/latest/userguide/launch-wizard-sap-software-install-details.html)의 **S/4HANA**에 대한 Launch Wizard의 폴더 계층 구조를 따라야 합니다. | 클라우드 관리자 | 
| VirtualBox를 설치합니다. | Oracle의 [VirtualBox](https://www.virtualbox.org/)를 설치하고 구성합니다. | DevOps 엔지니어 | 
| Vagrant를 설치합니다. | HashiCorp의 [Vagrant](https://www.vagrantup.com/)를 설치하고 구성합니다. | DevOps 엔지니어 | 
| 계정을 구성합니다. | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/install-sap-systems-automatically-by-using-open-source-tools.html) | 일반 AWS | 

### SAP 설치의 빌드 및 실행
<a name="build-and-run-your-sap-installation"></a>


| 작업 | 설명 | 필요한 기술 | 
| --- | --- | --- | 
| GitHub에서 코드 리포지토리를 복제합니다. | GitHub에서 [AWS-install-sap-with-jenkins-ansible](https://github.com/aws-samples/aws-install-sap-with-jenkins-ansible) 리포지토리를 복제합니다. | DevOps 엔지니어 | 
| Jenkins 서비스를 시작합니다. | Linux 터미널을 엽니다. 그런 다음 복제된 코드 리포지토리 폴더가 들어 있는 로컬 폴더로 이동하여 다음 명령을 실행합니다.<pre>sudo vagrant up</pre>Jenkins를 시작하는 데 약 20분이 소요됩니다. 이 명령은 성공 시 **서비스가 설정되었으며 실행 중**이라는 메시지를 반환합니다. | DevOps 엔지니어 | 
| 웹 브라우저에서 Jenkins를 열고 로그인합니다. | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/install-sap-systems-automatically-by-using-open-source-tools.html) | DevOps 엔지니어 | 
| SAP 시스템 설치 파라미터를 구성합니다. | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/install-sap-systems-automatically-by-using-open-source-tools.html)[See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/install-sap-systems-automatically-by-using-open-source-tools.html)사용 사례를 기준으로 필요에 따라 기타 비필수 파라미터를 구성할 수 있습니다. 예를 들어 SAP 시스템에 관하여 인스턴스의 SAP 시스템 ID(SID), 기본 암호, 이름, 태그를 변경할 수 있습니다. 모든 필수 변수는 이름 앞에 **(필수)**라고 표시됩니다. | 시스템 관리자, DevOps 엔지니어 | 
| SAP 시스템 설치를 실행합니다. | [See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/install-sap-systems-automatically-by-using-open-source-tools.html)파이프라인 절차에 대한 정보는 AWS Blog에서 [오픈소스 도구를 활용한 SAP 설치 자동화](https://aws.amazon.com/blogs/awsforsap/automating-sap-installation-with-open-source-tools/)의 **파이프라인 절차에 대한 이해** 섹션을 참조하십시오.오류가 발생하는 경우 나타나는 빨간색 오류 상자 위로 커서를 이동하고 **로그**를 선택합니다. 오류가 발생한 파이프라인 단계의 로그가 나타납니다. 대부분의 오류는 잘못된 파라미터 설정으로 인해 발생합니다. | DevOps 엔지니어, 시스템 관리자 | 

## 관련 리소스
<a name="install-sap-systems-automatically-by-using-open-source-tools-resources"></a>
+ [SAP용 DevOps — SAP 설치: 2개월\~2시간](https://videos.itrevolution.com/watch/707351918/)(DevOps Enterprise Summit Video Library)