最近のアクセス:
GAM Deploy Tool のコマンドライン (Windows のみ)

GAM Deploy Tool は、コマンドラインからパッケージをインポート/エクスポートするタスクを実行します。動作は、UI を使用した場合と似ています。ユーザーが UI で指定する情報はすべて、対応する引数を使用して指定できます。
このツールは Windows でのみ実行でき (gamdeploytool.exe)、スタンドアロンで配布されます。

有効な引数


•    -apps <モード>: インポートするアプリケーションを指定します。指定できる値は none、all、{<アプリケーションの guid1>,...,<アプリケーションの guidn>} です。値が "all" の場合、パッケージに含まれるすべてのアプリケーションがインポートされます。値が "none" の場合はその逆で、どのアプリケーションもインポートされません。アプリケーションの GUID をコンマで区切って 1 つずつ指定することもできます。
•    -config_file_path <名前>: GX のプロセスを実行するために作成される設定ファイル (client.exe.config) のコピー先を指定する場合に使用します。
•    -conn_string_additional_args <引数>: DB への接続文字列を作成するときに考慮する追加の引数です。
•    -connection_gam_file <ディレクトリー>: 挿入データを含む connection.gam ファイルを保存するディレクトリーの名前です。
•    -dbms <コード>*: GeneXus で管理している DBMS のコードです。
•    -db_name <名前>: GAM のスキーマがある DB の名前です。
•    -db_pass <パスワード>: DBMS への接続に使用するユーザーのパスワードです。
•    -db_user <ユーザー>: DBMS への接続に使用するユーザー名です。
•    -gam_pass <パスワード>: GAM 管理者ユーザーのパスワードです。
•    -gam_user <ユーザー>: GAM 管理者のユーザー名です (既定は "gamadmin")
•    -gen_def_rep_conn: 挿入/更新するリポジトリへの新しい接続を作成する場合に指定します。
•    -help: 使用できる引数を示すヘルプメッセージが表示されます。
•    -import <タイプ>: インポートモードと、更新する必要があるエンティティを示します。指定できる値は、full、または次のキーをコンマで区切り {} で囲んだものです: repository、users、roles、sec_policies。たとえば "-import {roles,users,repository}" は有効です。
•    -informix_srv <インスタンス>: Informix Server インスタンスの名前を指定します。
•    -log_file <名前>: ツールの出力を保存するファイルを指定します。既定では、%USER_TEMP_DIR%\GamLog.log に出力されます。
•    -file <パッケージのパス>: インポートするパッケージファイルのパスを指定します。
•    -srv_host <サーバー>: 接続するデータベースサーバーの名前または IP アドレスです。
•    -srv_port <ポート>: DBMS のリスニングポートを指定します。
•    -use_exported_conns: エクスポート時のリポジトリ接続をインポート時に考慮する場合に指定します。
•    -use_nt_sec: Windows NT が提供する認証モードを使用して DBMS に接続する必要がある場合に指定します。
•    -verbose: アプリケーションの出力をコンソールにもリダイレクトする場合に指定します。GamLog.log ファイルも生成されます (または指定するファイル)

GAM Deploy Tool の入力の設定

GAM Deploy Tool は、XML ファイルから入力を受け取ることができます。 
コンソールを通じた引数の入力は、インポート操作の場合にのみ有効です。それ以外の場合は、XML ファイルを入力として使用する必要があります。次に、入力用 XML ファイルの設定スキーマを示します。
<?xml version="1.0" encoding="Windows-1252"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="GamDeployTool">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="GeneralSettings">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ProcessType" type="xs:string" />
              <xs:element name="GamAdminName" type="xs:string" />
              <xs:element name="GamAdminPass" type="xs:string" />
              <xs:element name="Verbose" type="xs:boolean" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DbmsSettings">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="DbmsCode" type="xs:unsignedByte" />
              <xs:element name="ServerHost" type="xs:string" />
              <xs:element name="ServerPort" type="xs:unsignedShort" />
              <xs:element name="UseWindowsNT" type="xs:boolean" />
              <xs:element name="DbmsUser" type="xs:string" />
              <xs:element name="DbmsPass" type="xs:string" />
              <xs:element name="DbName" type="xs:string" />
              <xs:element name="AdditionalStrings" />
              <xs:element name="InformixInstance" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ExportSettings" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="PackageFilePath" type="xs:string" />
              <xs:element name="ExportType" type="xs:string" />
              <xs:element name="ExportRepositorySettings" type="xs:boolean" />
              <xs:element name="ExportRoles" type="xs:boolean" />
              <xs:element name="ExportSecurityPolicies" type="xs:boolean" />
              <xs:element name="ExportUsers" type="xs:boolean" />
              <xs:element name="RepositoryGuid" type="xs:string" />
              <xs:element name="Platforms">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="Platform" type="xs:unsignedByte" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Applications">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="AppId" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ImportSettings" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="PackageFilePath" type="xs:string" />
              <xs:element name="ImportType" type="xs:string" />
              <xs:element name="ImportRepositorySettings" type="xs:boolean" />
              <xs:element name="ImportRoles" type="xs:boolean" />
              <xs:element name="ImportSecurityPolicies" type="xs:boolean" />
              <xs:element name="ImportUsers" type="xs:boolean" />
              <xs:element name="ImportConnections" type="xs:boolean" />
              <xs:element name="ImportAuthenticationTypes" type="xs:boolean" />
              <xs:element name="GenerateDefaultConnection" type="xs:boolean" />
              <xs:element name="ImportRepositoryAction" type="xs:string" />
              <xs:element name="RepositoryGuid" />
              <xs:element name="NewRepositorySettings">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Name" type="xs:string" />
                    <xs:element name="Namespace" type="xs:string" />
                    <xs:element name="Description" type="xs:string" />
                    <xs:element name="AdminUserName" type="xs:string" />
                    <xs:element name="AdminUserPass" type="xs:string" />
                    <xs:element name="ConnectionUserName" type="xs:string" />
                    <xs:element name="ConnectionUserPass" type="xs:string" />
                    <xs:element name="AllowOauthAccess" type="xs:boolean" />
                    <xs:element name="GiveAnonymousSessions" type="xs:boolean" />
                    <xs:element name="CanRegisterUsers" type="xs:boolean" />
                    <xs:element name="AdministratorRoleGuid" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Applications">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Application">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Id" type="xs:string" />
                          <xs:element name="ImportPermissions" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="GenerateConnectionFile" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ConnectionFileDir" type="xs:string" />
              <xs:element name="Connections">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Connection">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="RepositoryId" type="xs:string" />
                          <xs:element name="Name" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

 

ExportSettings、ImportSettings、GenerateConnectionFile の各セクションはプロセス (GeneralSettings 内の [ ProcessType ] プロパティ) によっては省略できます。
GAM Deploy Tool の XSD 入力ファイルをダウンロードできます。このファイルでは、各フィールドの有効な値と制約を示しています。
GAM Deploy Tool の XML 入力ファイルのサンプルもダウンロードできます。


1.SQL Server にある GamDb という DB に対してフルインポートを実行します。Windows NT の認証を使用します。
> GamDeployTool.exe -file c:\pack.gpkg -dbms 12 -srv_host localhost -use_nt_sec -db_name GamDb -gam_user gamadmin -gam_pass gamadmin123 -import full -connection_gam_file c:\connection.gam -use_exported_connections

2.MySQL にある GamDb という DB に対してカスタムインポートを実行します。インポートするアプリケーションの GUID は次のとおりです: '54fdaafd-cb9f-4786-b7d6-f9b20e20a8e2'
> GamDeployTool.exe -file c:\pack.gpkg -dbms 18 -srv_host localhost -db_user root -db_pass root -db_name GamDb -gam_user gamadmin -gam_pass gamadmin123 -import repository,roles -apps 54fdaafd-cb9f-4786-b7d6-f9b20e20a8e2 -connection_gam_file c:\connection.gam -gen_def_rep_conn -verbose
手順 3 -XML 形式の入力ファイルを使用した例:
> GamDeployTool.exe -xml_config_path c:\arguments.xml
GAM Manager リポジトリへの接続用に connection.gam ファイルを作成することを指定する XML ファイルのサンプルを以下に示します。
<GamDeployTool>

<GeneralSettings>
 
  <ProcessType>GenerateConnectionFile</ProcessType>
 
  <GamAdminName>gamadmin</GamAdminName>

  <GamAdminPass>gamadmin123</GamAdminPass>
  <Verbose>false</Verbose>
</GeneralSettings>


<DbmsSettings>
 
  <DbmsCode>18</DbmsCode>
  
  <ServerHost>localhost</ServerHost>

  <ServerPort>3306</ServerPort>
  
  <UseWindowsNT>false</UseWindowsNT>
 
  <DbmsUser>root</DbmsUser>
 
  <DbmsPass>root</DbmsPass>

  <DbName>gamtestplatform_gam</DbName>

  <AdditionalStrings></AdditionalStrings>
 
  <InformixInstance></InformixInstance>
</DbmsSettings>


<GenerateConnectionFile>

  <ConnectionFileDir>c:\</ConnectionFileDir>

  <Connections>
   <Connection>

    <RepositoryId>92b783a2-2a50-4261-8ba7-684fb780967d</RepositoryId>

    <Name>GAM-Manager</Name>
   </Connection>
  </Connections>
</GenerateConnectionFile>
</GamDeployTool>


DBMS コードの一覧

  • DB2_UDB = 5
  • ORACLE = 7
  • DB2_ISERIES = 9
  • INFORMIX = 11
  • SQL_SERVER = 12
  • POSTGRESQL = 15
  • MYSQL = 18







サブページ
Created: 17/05/30 19:02 by Admin Last update: 21/08/23 20:00 by Admin
カテゴリ
Powered by GXwiki 3.0