-
-
Microsoft Azure クラウドにCitrix ADMサービスエージェントをインストールする
-
-
-
-
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Microsoft AzureクラウドにCitrix ADM エージェントをインストールする
エージェントは、Citrix Application Delivery Management(Citrix ADM)と、エンタープライズデータセンターまたはクラウド上の管理対象インスタンスの間の仲介として機能します。
Microsoft Azure クラウドにCitrix ADMエージェントをインストールするには、仮想ネットワークにエージェントのインスタンスを作成する必要があります。Azure Marketplace から Citrix ADM エージェントイメージを取得し、Azure Resource Manager ポータルを使用してエージェントを作成します。
Citrix ADMエージェントインスタンスの作成を開始する前に、インスタンスが配置される必須サブネットで仮想ネットワークを作成していることを確認します。仮想マシンのプロビジョニング時に仮想ネットワークを作成することもできますが、柔軟性に欠けるため別のサブネットを作成することはできません。仮想ネットワークの作成については、http://azure.microsoft.com/en-us/documentation/articles/create-virtual-networkを参照してください。
仮想マシンがインターネットリソースにアクセスできるようにする DNS サーバーと VPN 接続を構成します。
前提条件
以下が割り当てられていることを確認してください。
- Microsoft Azure ユーザーアカウント
- Microsoft Azure Resource Manager へのアクセス
注
- Citrix ADM エージェント仮想マシンをプロビジョニングする前に、リソースグループ、ネットワークセキュリティグループ、仮想ネットワークなどのエンティティを作成して、Provisioning 中にネットワーク情報を使用できるようにすることをお勧めします。
- Citrix ADMエージェントがCitrix ADMおよびCitrix ADCインスタンスと通信するには、推奨ポートが開いていることを確認します。Citrix ADMエージェントのポート要件の詳細については、「ポート」を参照してください。
Microsoft Azure クラウドにCitrix ADMエージェントをインストールするには:
-
Microsoft Azure 資格情報を使用して、Azure ポータル (https://portal.azure.com) にログオンします。
-
[ +リソースの作成] をクリックします。
-
検索バーに
Citrix ADM Agent
を入力し、 Citrix ADMサービスエージェントを選択します。 -
[作成] をクリックします。
-
[仮想マシンの作成] ウィンドウで、各セクションで必要な値を指定して、仮想マシンを作成します。
基本:
このタブで、 プロジェクトの詳細、 インスタンスの詳細、 および管理者アカウントを指定します。
- 「リソースグループ 」— 作成したリソースグループをドロップダウンリストから選択します。
注:
この時点でリソースグループを作成できますが、Azure Resource Managerのリソースグループからリソースグループを作成し、ドロップダウンリストからグループを選択することをお勧めします。
-
「仮想マシン名」 — Citrix ADMエージェントインスタンスの名前を指定します。
-
[Region ]:エージェントをデプロイするリージョンを選択します。
-
「可用性オプション 」— リストから可用性セットを選択します。
-
イメージ :このフィールドには、すでに選択されているエージェントイメージが表示されます。別のエージェントイメージに変更する場合は、リストから必要なイメージを選択します。
-
[サイズ ]:Citrix ADMエージェントを展開する仮想ディスクのタイプとサイズを指定します。
リストから [サポートされる仮想ディスクの種類 (HDD または SSD)] を選択します。
-
「認証タイプ 」—「パスワード」を選択します。
- 「ユーザー名とパスワード 」— 作成したリソースグループ内のリソースにアクセスするためのユーザー名とパスワードを指定します。
ディスク:
このタブで、[ ディスクオプション ] と [ データディスク] を指定します。
- OSディスクタイプ :仮想ディスクの種類(HDDまたはSSD)を選択します。
ネットワーク:
必要なネットワークの詳細を指定します。
- [仮想ネットワーク ] — 仮想ネットワークを選択します。
- [Subnet] —サブネットアドレスを設定します 。
- 「パブリック IP アドレス 」— IP アドレスを選択します。
- [ネットワークセキュリティグループ ] — 作成したセキュリティグループを選択します。
- インバウンドポートの選択 -パブリックインバウンドポートを許可する場合は、インバウンドルールとアウトバウンドルールがセキュリティグループで設定されていることを確認します。次に、リストから受信ポートを選択します。詳細については、「前提条件」を参照してください。
管理:
Azure セキュリティセンター、 監視、および IDを指定します。
詳細設定:
オプション、 拡張機能、 カスタムデータ、 および近接プレイスメントグループを指定します。
[ カスタムデータ] では、エージェントの自動登録スクリプトを指定して、エージェントを ADM サービスに登録できます。スクリプトを実行し、エージェントを登録する
deployment.py
スクリプトの例を次に示します。```python #!/var/python/bin/python2.7 import os import requests import json import time import re import logging import logging.handlers import boto3 ''' スクリプトの概要: このスクリプトは、ADM エージェントを ADM に登録するのに役立ちます。これをuserdata に渡して、AWS の ADM エージェントを起動時に自動登録するようにします。ワークフローは次のとおりです 1) AWS シークレットストアから ADM サービス API 認証情報(ID とシークレット) を取得する(注:AWS シークレットストアからシークレットをフェッチする許可を与える ADM Agent に IAM ロールを割り当てる必要があります) 2) ステップ 1 で取得した認証情報を使用して ADM サービスにログインします。 3) ADMサービスを呼び出して、エージェント登録のための資格情報(ServiceURLとトークン)を取得する 4) 手順 3 で取得した認証情報を使用して登録を呼び出す ''' ''' これらは、セットアップの設定に応じて置き換える必要があるプレースホルダです aws_secret_id: ADM 認証情報を格納した AWS シークレットの ID 秘密の値は次のjson形式にする必要があります { "adm_user_id_key": "YOUR_ID", " adm_user_secret_key": "YOUR_SECRET"} ''' aws_secret_id = "<AWS_secret_id>」 adm_ip_or_hostname = "<YOUR_ADM_POP> .adm.cloud.com」 ''' Set up a specific logger with your desired output level and log file name ''' log_file_name_local = os.path.basename (__file__) LOG_FILENAME = '/var/log/' + 'bootstrap' + '.log' LOG_MAX_BYTE = 50*1024* 1024 LOG_BACKUP_COUNT = 20 logger = logging.getLogger(__name__) logger.setLevel (logging.debug) logger_handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=LOG_MAX_BYTE, backupCount=LOG_BACKUP_COUNT) logger_fortmater = logging.Formatter(fmt='%(asctime)-2s:%(funcName)30s:%(lineno)4d: [%(levelname)s] %(message)s', datefmt="%Y-%m-%d %H:%M:%S") logger_handler.setFormatter (logger_fortmater) logger.AddHandler (logger_handler class APIHandlerException(Exception): def __init__(self, error_code, message): self.error_code = error_code self.message = message def __str__(self): return self.message + ". Error code '" + str(self.error_code) + "'" def parse_response(response, url, print_response=True): if not response.ok: if "reboot" in url: logger.debug('No response for url: reboot') resp = {"errorcode": "500", "message": "Error while reading response."} return resp if print_response: logger.debug('Response text for %s is %s' % (url, response.text)) response = json.loads(response.text) logger.debug("ErrorCode - " + str(response['errorcode']) + ". Message -" + str(response['message'])) raise APIHandlerException(response['errorcode'], str(response['message'])) elif response.text: if print_response: logger.debug('Response text for %s is %s' % (url, response.text)) result = json.loads(response.text) if 'errorcode' in result and result['errorcode'] > 0: raise APIHandlerException(result['errorcode'], str(result['message'])) return result def _request(method, url, data=None, headers=None, retry=3, print_response=True): try: response = requests.request(method, url, data=data, headers=headers) result = parse_response(response, url, print_response=print_response) return result except [requests.exceptions.ConnectionError, requests.exceptions.ConnectTimeout]: if retry > 0: return _request(method, url, data, headers, retry-1, print_response=print_response) else: raise APIHandlerException(503, 'ConnectionError') except requests.exceptions.RequestException as e: logger.debug(str(e)) raise APIHandlerException(500, str(e)) except APIHandlerException as e: logger.debug("URL: %s, Error: %s, Message: %s" % (url, e.error_code, e.message)) raise e except Exception as e: raise APIHandlerException(500, str(e)) try: '''Get the AWS Region''' client = boto3.client('s3') my_region = client.meta.region_name logger.debug("The rgion is %s" % (my_region)) '''Creating a Boto cleint session''' session = boto3.session.Session() client = session.client( service_name='secretsmanager', region_name=my_region ) '''Getting the values stored in the secret with id: <aws_secret_id>''' get_id_value_response = client.get_secret_value( secretID = aws_secret_id ) adm_user_id = json.loads(get_id_value_response["SecretString"])["adm_user_id_key"] adm_user_secret = json.loads(get_id_value_response["SecretString"])["adm_user_secret_key"] except Exception as e: logger.debug("Fetching of ADM credentials from AWS secret failed with error: %s" % (str(e))) raise e ''' Initializing common ADM API handlers ''' mas_common_headers = { 'Content-Type': "application/json", 'Accept-type': "application/json", 'Connection': "keep-alive", 'isCloud': "true" } ''' API to login to the ADM and fetch the Session ID and Tenant ID ''' url = "https://" + str(adm_ip_or_hostname) + "/nitro/v1/config/login" payload = 'object={"login":{"ID":"' + adm_user_id + '","Secret":"' + adm_user_secret + '"}}' try: response = _request("POST", url, data=payload, headers=mas_common_headers) sessionid = response["login"][0]["sessionid"] tenant_id = response["login"][0]["tenant_name"] except Exception as e: logger.debug("Login call to the ADM failed with error: %s" % (str(e))) raise e ''' API to fetch the service URL and Token to be used for registering the agent with the ADM ''' mas_common_headers['Cookie'] = 'SESSID=' + str(sessionid) url = "https://" + str(adm_ip_or_hostname) + "/nitro/v1/config/trust_preauthtoken/" + tenant_id +"?customer="+ tenant_id logger.debug("Fetching Service URL and Token.") try: response = _request("GET", url, data=None, headers=mas_common_headers) service_name = response["trust_preauthtoken"][0]["service_name"] token = response["trust_preauthtoken"][0]["token"] api_gateway_url = response["trust_preauthtoken"][0]["api_gateway_url"] except Exception as e: logger.debug("Fetching of the Service URL Passed with error. %s" % (str(e))) raise e ''' Running the register agent command using the values we retrieved earlier ''' try: registeragent_command = "registeragent -serviceurl "+api_gateway_url+" -activationcode "+service_name+"\;"+token file_run_command = "/var/python/bin/python2.7 /mps/register_agent_cloud.py "+registeragent_command logger.debug("Executing registeragent command: %s" % (file_run_command)) os.system(file_run_command) except Exception as e: logger.debug("Agent Registeration failed with error: %s" % (str(e))) raise e <!--NeedCopy--> ```
この自動登録スクリプトを指定する場合は、手順 7 と 8 を省略します。
タグ:
ADM エージェントタグのキーと値のペアを入力します。タグは、大文字と小文字を区別するキーと値のペアで構成されます。これらのタグを使用すると、エージェントを簡単に整理して識別できます。タグは、Azure と Citrix ADM の両方に適用されます。
構成設定が検証され、[ レビューと作成 ] タブに検証の結果が表示されます。
- 検証が失敗した場合、このタブに失敗した理由が表示されます。個別のセクションに戻り、必要に応じて変更します。
-
検証に合格した場合は、[ 作成] をクリックします。エージェントの展開プロセスが開始されます。
展開プロセスには約 10 ~ 15 分かかる場合があります。展開が正常に完了すると、Microsoft Azure アカウントでCitrix ADMエージェント仮想マシンを表示できます。
- 「リソースグループ 」— 作成したリソースグループをドロップダウンリストから選択します。
-
エージェントが起動して実行されたら、SSHクライアントを使用して、 パブリックIPアドレスを使用してCitrixADMエージェントにログオンします。
注
- ユーザー名をとして指定した場合は `nsrecover`、デフォルトのCitrix ADMエージェント資格情報(**nsrecover/nsroot**)を使用して仮想マシンにログオンします。
- 最初のログオン後にデフォルトのパスワードを変更することをお勧めします。パスワードを変更するには、シェルで passwd nsrootと入力します。
-
次のコマンドを入力して、展開画面を起動します。 deployment_type.py
-
はじめにの説明に従って、Citrix ADM の[ エージェントの設定 ]ページからコピーして保存した サービスURL と アクティベーションコード を入力します。エージェントは、サービス URL を使用してサービスを検索し、アクティベーションコードを使用してサービスに登録します。
エージェントの登録に成功すると、エージェントは再起動してインストールプロセスを完了します。
エージェントが再起動したら、Citrix ADMにアクセスし、[ エージェントの設定 ]ページの[ 検出されたエージェント]で、エージェントの状態を確認します。
共有
共有
この記事の概要
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.