Skip to main content
日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。

ステップバイステップの展開手順

共同作成者 kevin-hoke

このドキュメントでは、自動化コマンド ライン インターフェイス (CLI) を使用した Oracle 19c の導入について詳しく説明します。

CLI デプロイメント Oracle 19c データベース

このセクションでは、CLI を使用して Oracle19c データベースを準備およびデプロイするために必要な手順について説明します。必ず確認し、"開始と要件のセクション"それに応じて環境を準備しました。

Oracle19cリポジトリをダウンロード

  1. Ansible コントローラーから、次のコマンドを実行します。

    git clone https://github.com/NetApp-Automation/na_oracle19c_deploy.git
  2. リポジトリをダウンロードした後、ディレクトリを na_oracle19c_deploy <cd na_oracle19c_deploy> に変更します。

ホストファイルを編集する

展開前に次の作業を完了してください。

  1. ホスト ファイル na_oracle19c_deploy ディレクトリを編集します。

  2. [ontap] の下で、IP アドレスをクラスター管理 IP に変更します。

  3. [oracle] グループの下に、Oracle ホスト名を追加します。ホスト名は、DNS またはホスト ファイルを通じて IP アドレスに解決されるか、ホストで指定される必要があります。

  4. これらの手順を完了したら、変更を保存します。

次の例はホスト ファイルを示しています。

#ONTAP Host

[ontap]

"10.61.184.183"

#Oracle hosts

[oracle]

"rtpora01"

"rtpora02"

この例では、プレイブックを実行し、2 つの Oracle DB サーバーに同時に Oracle 19c をデプロイします。 1 つの DB サーバーだけでテストすることもできます。その場合、ホスト変数ファイルを 1 つだけ構成する必要があります。

メモ プレイブックは、デプロイする Oracle ホストとデータベースの数に関係なく、同じように実行されます。

host_varsの下のhost_name.ymlファイルを編集します。

各 Oracle ホストには、ホスト固有の変数を含むホスト名で識別されるホスト変数ファイルがあります。ホストには任意の名前を指定できます。編集してコピーする `host_vars`ホストVARS設定セクションからコピーして、希望する場所に貼り付けます。 `host_name.yml`ファイル。

メモ 青色の項目は、環境に合わせて変更する必要があります。

ホストVARS構成

######################################################################
##############      Host Variables Configuration        ##############
######################################################################

# Add your Oracle Host
ansible_host: "10.61.180.15"

# Oracle db log archive mode: true - ARCHIVELOG or false - NOARCHIVELOG
log_archive_mode: "true"

# Number of pluggable databases per container instance identified by sid. Pdb_name specifies the prefix for container database naming in this case cdb2_pdb1, cdb2_pdb2, cdb2_pdb3
oracle_sid: "cdb2"
pdb_num: "3"
pdb_name: "{{ oracle_sid }}_pdb"

# CDB listener port, use different listener port for additional CDB on same host
listener_port: "1523"

# CDB is created with SGA at 75% of memory_limit, MB. Consider how many databases to be hosted on the node and how much ram to be allocated to each DB. The grand total SGA should not exceed 75% available RAM on node.
memory_limit: "5464"

# Set "em_configuration: DBEXPRESS" to install enterprise manager express and choose a unique port from 5500 to 5599 for each sid on the host.
# Leave them black if em express is not installed.
em_configuration: "DBEXPRESS"
em_express_port: "5501"

# {{groups.oracle[0]}} represents first Oracle DB server as defined in Oracle hosts group [oracle]. For concurrent multiple Oracle DB servers deployment, [0] will be incremented for each additional DB server. For example,  {{groups.oracle[1]}}" represents DB server 2, "{{groups.oracle[2]}}" represents DB server 3 ... As a good practice and the default, minimum three volumes is allocated to a DB server with corresponding /u01, /u02, /u03 mount points, which store oracle binary, oracle data, and oracle recovery files respectively. Additional volumes can be added by click on "More NFS volumes" but the number of volumes allocated to a DB server must match with what is defined in global vars file by volumes_nfs parameter, which dictates how many volumes are to be created for each DB server.
host_datastores_nfs:
  - {vol_name: "{{groups.oracle[0]}}_u01", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}
  - {vol_name: "{{groups.oracle[0]}}_u02", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}
  - {vol_name: "{{groups.oracle[0]}}_u03", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}

vars.ymlファイルを編集する

その `vars.yml`ファイルは、Oracle デプロイメントのすべての環境固有の変数 (ONTAP、Linux、または Oracle) を統合します。

  1. VARSセクションから変数を編集してコピーし、これらの変数を `vars.yml`ファイル。

#######################################################################
###### Oracle 19c deployment global user configuration variables ######
######  Consolidate all variables from ontap, linux and oracle   ######
#######################################################################

###########################################
### Ontap env specific config variables ###
###########################################

#Inventory group name
#Default inventory group name - 'ontap'
#Change only if you are changing the group name either in inventory/hosts file or in inventory groups in case of AWX/Tower
hosts_group: "ontap"

#CA_signed_certificates (ONLY CHANGE to 'true' IF YOU ARE USING CA SIGNED CERTIFICATES)
ca_signed_certs: "false"

#Names of the Nodes in the ONTAP Cluster
nodes:
 - "AFF-01"
 - "AFF-02"

#Storage VLANs
#Add additional rows for vlans as necessary
storage_vlans:
   - {vlan_id: "203", name: "infra_NFS", protocol: "NFS"}
More Storage VLANsEnter Storage VLANs details

#Details of the Data Aggregates that need to be created
#If Aggregate creation takes longer, subsequent tasks of creating volumes may fail.
#There should be enough disks already zeroed in the cluster, otherwise aggregate create will zero the disks and will take long time
data_aggregates:
  - {aggr_name: "aggr01_node01"}
  - {aggr_name: "aggr01_node02"}

#SVM name
svm_name: "ora_svm"

# SVM Management LIF Details
svm_mgmt_details:
  - {address: "172.21.91.100", netmask: "255.255.255.0", home_port: "e0M"}

# NFS storage parameters when data_protocol set to NFS. Volume named after Oracle hosts name identified by mount point as follow for oracle DB server 1. Each mount point dedicates to a particular Oracle files: u01 - Oracle binary, u02 - Oracle data, u03 - Oracle redo. Add additional volumes by click on "More NFS volumes" and also add the volumes list to corresponding host_vars as host_datastores_nfs variable. For multiple DB server deployment, additional volumes sets needs to be added for additional DB server. Input variable "{{groups.oracle[1]}}_u01", "{{groups.oracle[1]}}_u02", and "{{groups.oracle[1]}}_u03" as vol_name for second DB server. Place volumes for multiple DB servers alternatingly between controllers for balanced IO performance, e.g. DB server 1 on controller node1, DB server 2 on controller node2 etc. Make sure match lif address with controller node.

volumes_nfs:
  - {vol_name: "{{groups.oracle[0]}}_u01", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}
  - {vol_name: "{{groups.oracle[0]}}_u02", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}
  - {vol_name: "{{groups.oracle[0]}}_u03", aggr_name: "aggr01_node01", lif: "172.21.94.200", size: "25"}

#NFS LIFs IP address and netmask

nfs_lifs_details:
  - address: "172.21.94.200" #for node-1
    netmask: "255.255.255.0"
  - address: "172.21.94.201" #for node-2
    netmask: "255.255.255.0"

#NFS client match

client_match: "172.21.94.0/24"

###########################################
### Linux env specific config variables ###
###########################################

#NFS Mount points for Oracle DB volumes

mount_points:
  - "/u01"
  - "/u02"
  - "/u03"

# Up to 75% of node memory size divided by 2mb. Consider how many databases to be hosted on the node and how much ram to be allocated to each DB.
# Leave it blank if hugepage is not configured on the host.

hugepages_nr: "1234"

# RedHat subscription username and password

redhat_sub_username: "xxx"
redhat_sub_password: "xxx"

####################################################
### DB env specific install and config variables ###
####################################################

db_domain: "your.domain.com"

# Set initial password for all required Oracle passwords. Change them after installation.

initial_pwd_all: "netapp123"

プレイブックを実行する

必要な環境の前提条件を完了し、変数をコピーした後、 `vars.yml`そして `your_host.yml`これで、プレイブックをデプロイする準備が整いました。

メモ <username> は環境に合わせて変更する必要があります。
  1. 正しいタグとONTAPクラスタのユーザー名を渡して、 ONTAPプレイブックを実行します。 ONTAPクラスターのパスワードを入力し、プロンプトが表示されたら vsadmin を入力します。

    ansible-playbook -i hosts all_playbook.yml -u username -k -K -t ontap_config -e @vars/vars.yml
  2. Linux プレイブックを実行して、デプロイメントの Linux 部分を実行します。管理者の ssh パスワードと sudo パスワードを入力します。

    ansible-playbook -i hosts all_playbook.yml -u username -k -K -t linux_config -e @vars/vars.yml
  3. Oracle プレイブックを実行して、デプロイメントの Oracle 部分を実行します。管理者の ssh パスワードと sudo パスワードを入力します。

    ansible-playbook -i hosts all_playbook.yml -u username -k -K -t oracle_config -e @vars/vars.yml

同じOracleホストに追加のデータベースを導入する

プレイブックの Oracle 部分では、実行ごとに Oracle サーバー上に単一の Oracle コンテナ データベースが作成されます。同じサーバー上に追加のコンテナ データベースを作成するには、次の手順を実行します。

  1. host_vars 変数を修正します。

    1. ステップ3に戻って編集します host_name.yml`ファイル `host_vars

    2. Oracle SID を別の命名文字列に変更します。

    3. リスナー ポートを別の番号に変更します。

    4. EM Express をインストールしている場合は、EM Express ポートを別の番号に変更します。

    5. 修正したホスト変数をコピーして、次のOracleホスト変数ファイルに貼り付けます。 host_vars

  2. プレイブックを実行するには、 `oracle_config`上記のタグプレイブックを実行する

Oracleのインストールを検証する

  1. Oracle ユーザーとして Oracle サーバーにログインし、次のコマンドを実行します。

    ps -ef | grep ora
    メモ インストールが期待通りに完了し、Oracle DBが起動した場合、Oracleプロセスが一覧表示されます。
  2. データベースにログインして、db 構成設定と次のコマンド セットで作成された PDB を確認します。

    [oracle@localhost ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 6 12:52:51 2021
    Version 19.8.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.8.0.0.0
    
    SQL>
    
    SQL> select name, log_mode from v$database;
    NAME      LOG_MODE
    --------- ------------
    CDB2      ARCHIVELOG
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 CDB2_PDB1                      READ WRITE NO
             4 CDB2_PDB2                      READ WRITE NO
             5 CDB2_PDB3                      READ WRITE NO
    
    col svrname form a30
    col dirname form a30
    select svrname, dirname, nfsversion from v$dnfs_servers;
    
    SQL> col svrname form a30
    SQL> col dirname form a30
    SQL> select svrname, dirname, nfsversion from v$dnfs_servers;
    
    SVRNAME                        DIRNAME                        NFSVERSION
    ------------------------------ ------------------------------ ----------------
    172.21.126.200                 /rhelora03_u02                 NFSv3.0
    172.21.126.200                 /rhelora03_u03                 NFSv3.0
    172.21.126.200                 /rhelora03_u01                 NFSv3.0

    これにより、dNFS が正常に動作していることが確認されます。

  3. 次のコマンドを使用して、リスナー経由でデータベースに接続し、Oracle リスナーの構成を確認します。適切なリスナー ポートとデータベース サービス名に変更します。

    [oracle@localhost ~]$ sqlplus system@//localhost:1523/cdb2_pdb1.cie.netapp.com
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Thu May 6 13:19:57 2021
    Version 19.8.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Wed May 05 2021 17:11:11 -04:00
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.8.0.0.0
    
    SQL> show user
    USER is "SYSTEM"
    SQL> show con_name
    CON_NAME
    CDB2_PDB1

    これにより、Oracle リスナーが正常に動作していることが確認されます。

どこに助けを求めたらいいですか?

ツールキットに関するサポートが必要な場合は、"NetAppソリューション オートメーション コミュニティ サポート Slack チャンネル"質問や問い合わせを投稿するには、ソリューション自動化チャネルを探してください。