Resource Orchestration Service (ROS) を使用すると、ECS インスタンスや ApsaraDB RDS インスタンスなど、必要な Alibaba Cloud リソースとその依存関係をテンプレートで定義できます。その後、ROS のオーケストレーションエンジンがテンプレートに基づいてリソースを自動的に作成および構成し、自動デプロイと運用を実現します。このトピックでは、Object Storage Service (OSS) と ROS を使用して SharePoint 2013 環境を迅速に作成する方法について説明します。
このトピックの例は、Alibaba Cloud ユーザーによる参考例です。
前提条件
-
アクセス制御リスト (ACL) がプライベートに設定されたバケットが作成されていること。バケットの作成方法については、「Create buckets」をご参照ください。
-
sharepoint.exe インストールファイルをダウンロードします。
手順 1:バケットへの sharepoint.exe のアップロード
OSSコンソールにログインします。
左側のナビゲーションウィンドウで、バケット をクリックします。 [バケット] ページで、目的のバケットを見つけてクリックします。
-
左側のナビゲーションペインで、 を選択します。
-
ダウンロードした
sharepoint.exeファイルをアップロードします。ファイルをアップロードする際は、オブジェクトの ACL を [Public Read] に設定し、その他のパラメータはデフォルト設定のままにします。オブジェクトのアップロード方法については、「Upload objects」をご参照ください。
-
オブジェクト URL を取得します。
ファイルのアップロード後、
sharepoint.exeオブジェクトを見つけて「操作」列の 詳細 をクリックし、次に オブジェクト URL のコピー をクリックします。
手順 2:ROS によるスタックの作成
-
テンプレートを選択します。
-
ROS コンソールにログインします。
-
左側のナビゲーションペインで、[スタック] をクリックします。
-
トップナビゲーションバーで、リージョンドロップダウンリストから [China (Hangzhou)] を選択します。
-
[スタック] ページで、[スタックの作成] をクリックします。 既存テンプレートの使用 を選択します。 「テンプレートのインポート方法」には、テンプレート内容の入力 を選択します。 [JSON] タブで、次のテンプレート内容を入力し、[次へ] をクリックします。
-
{ "ROSTemplateFormatVersion": "2015-09-01", "Description": "This template deploys a simple ECS instance with SharePoint Foundation 2013. The default image is win2008r2_sp1_x64_ent_zh-cn_40G_alibase_20200116.vhd. You must specify an instance type.", "Parameters": { "VpcCidrBlock": { "Type": "String", "Description": { "en": "The IP address range of the VPC in CIDR block format. <br>You can use one of the following IP address ranges: <br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>", "zh-cn": "专有网络IP地址段范围,<br>您可以使用以下的IP地址段:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>" }, "AllowedValues": [ "192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8" ], "Label": { "en": "VPC CIDR Block", "zh-cn": "专有网络网段" }, "Default": "192.168.0.0/16" }, "VSwitchCidrBlock": { "Type": "String", "Description": { "zh-cn": "创建的虚拟交换机的子网,必须是所属专有网络的子网段,并且没有被其他交换机占用。", "en": "The CIDR block of the VSwitch. It must be a subnet of the VPC and not be in use by another VSwitch." }, "Label": { "zh-cn": "交换机网段", "en": "VSwitch CIDR Block" }, "Default": "192.168.0.0/16" }, "ZoneId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId", "Description": { "en": "The ID of the availability zone.<br><b>Note: <font color='blue'>Before you select an availability zone, confirm that it supports the instance type you plan to create.</font></b>", "zh-cn": "可用区ID,<br><b>注: <font color='blue'>选择可用区前请确认该可用区是否支持创建ECS资源的规格</font></b>" }, "Label": { "zh-cn": "交换机可用区", "en": "VSwitch Availability Zone" } }, "SharePointDownloadPath": { "Label": { "zh-cn": "SharePoint镜像下载路径", "en": "SharePoint Image Download Path" }, "Type": "String", "Description": { "zh-cn": "SharePoint Foundation2013镜像下载路径,详见: <a href='https://docs.microsoft.com/zh-cn/OfficeUpdates/sharepoint-updates' target='_blank'><b><font color='blue'>SharePoint Foundation2013镜像下载路径</b></font></a>", "en": "The download path for the SharePoint Foundation 2013 image. For more information, see <a href='https://docs.microsoft.com/en-us/OfficeUpdates/sharepoint-updates' target='_blank'><b><font color='blue'>Updates for SharePoint 2013 and SharePoint Foundation 2013</b></font></a>." } }, "ImageId": { "Default": "win2008r2_sp1_x64_ent_zh-cn_40G_alibase_20200116.vhd", "Label": { "zh-cn": "镜像", "en": "Image ID" }, "Type": "String", "Description": { "zh-cn": "镜像ID,关于SharePoint Foundation2013系统要求,详见: <a href='https://docs.microsoft.com/zh-cn/sharepoint/install/hardware-and-software-requirements-0' target='_blank'><b><font color='blue'>SharePoint Foundation2013系统要求</b></font></a>", "en": "The image ID. For information about system requirements for SharePoint Foundation 2013, see <a href='https://docs.microsoft.com/en-us/sharepoint/install/hardware-and-software-requirements-0' target='_blank'><b><font color='blue'>Hardware and software requirements for SharePoint 2013</b></font></a>." } }, "InstanceType": { "Type": "String", "Description": { "zh-cn": "填写VSwitch可用区下可使用的规格;<br>通用规格:<font color='red'><b>ecs.c5.large</b></font><br>注:可用区可能不支持通用规格<br>规格详见:<a href='https://www.alibabacloud.com/help/document_detail/25378.html' target='_blank'><b><font color='blue'>实例规格族</font></a></b>", "en": "The instance types available in the specified VSwitch availability zone.<br>General-purpose instance type example: <font color='red'><b>ecs.c5.large</b></font><br>Note: Some availability zones may not support general-purpose instance types.<br>For more information, see <a href='https://www.alibabacloud.com/help/doc-detail/25378.html' target='_blank'><b><font color='blue'>Instance families</font></a></b>" }, "Label": { "zh-cn": "实例规格", "en": "Instance Type" }, "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType", "AssociationPropertyMetadata": { "ZoneId": "ZoneId" } }, "Password": { "NoEcho": true, "Type": "String", "Description": { "en": "The login password for the instance. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters: ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/", "zh-cn": "服务器登录密码,长度为8~30个字符,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。" }, "AllowedPattern": "[0-9A-Za-z\\_\\-\\&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$", "Label": { "zh-cn": "实例密码", "en": "Instance Password" }, "ConstraintDescription": { "en": "The password must be 8 to 30 characters long and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters from the following set: ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/", "zh-cn": "长度为8~30个字符,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)。" }, "MinLength": 8, "MaxLength": 30 } }, "Metadata": { "ALIYUN::ROS::Interface": { "ParameterGroups": [ { "Parameters": [ "VpcCidrBlock", "VSwitchCidrBlock" ], "Label": { "default": "VPC" } }, { "Parameters": [ "ZoneId", "ImageId", "SharePointDownloadPath", "InstanceType", "Password" ], "Label": { "default": "ECS" } } ], "TemplateTags": [ "acs:example:WindowsApplicationService:Create_SharePoint2013_Windows_Instance_with_ROS_and_OSS" ] } }, "Resources": { "RosWaitCondition": { "Type": "ALIYUN::ROS::WaitCondition", "Properties": { "Timeout": 2700, "Count": 2, "Handle": { "Ref": "RosWaitConditionHandle" } }, "Metadata": { "ALIYUN::ROS::Designer": { "id": "47058b03-d345-4071-bcdb-9bc2888899be" } } }, "EcsVswitch": { "Type": "ALIYUN::ECS::VSwitch", "Properties": { "VpcId": { "Ref": "EcsVpc" }, "ZoneId": { "Ref": "ZoneId" }, "CidrBlock": { "Ref": "VSwitchCidrBlock" } }, "Metadata": { "ALIYUN::ROS::Designer": { "id": "3f1d6b20-25eb-4a1c-a40f-1f764b157bd6" } } }, "SharePointServer": { "Type": "ALIYUN::ECS::Instance", "Properties": { "VpcId": { "Ref": "EcsVpc" }, "UserData": { "Fn::Replace": [ { "ros-notify": { "Fn::GetAtt": [ "RosWaitConditionHandle", "PowerShellCurlCli" ] } }, { "Fn::Join": [ "", [ "[powershell]\r\n", "New-Item -Path \"C:\\Install_dir\" -Force -type directory \r\n", "$ossName = 'ros-template-resources' \r\n", "$client = new-object System.Net.WebClient \r\n", "$client.DownloadFile(\"", { "Ref": "SharePointDownloadPath" }, "\", 'C:\\Install_dir\\SharePoint.exe') \r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/AppFabric1.1-RTM-KB2671763-x64-ENU.exe\", 'C:\\Install_dir\\AppFabric1.1-RTM-KB2671763-x64-ENU.exe')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/MicrosoftIdentityExtensions-64.msi\", 'C:\\Install_dir\\MicrosoftIdentityExtensions-64.msi')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/setup_msipc_x64.msi\", 'C:\\Install_dir\\setup_msipc_x64.msi')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/sqlncli.msi\", 'C:\\Install_dir\\sqlncli.msi')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/Synchronization.msi\", 'C:\\Install_dir\\Synchronization.msi')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/WcfDataServices.exe\", 'C:\\Install_dir\\WcfDataServices.exe')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/Windows6.1-KB974405-x64.msu\", 'C:\\Install_dir\\Windows6.1-KB974405-x64.msu')\r\n", "$client.DownloadFile(\"https://$ossName.oss-cn-beijing.aliyuncs.com/SharePoint/WindowsServerAppFabricSetup_x64.exe\", 'C:\\Install_dir\\WindowsServerAppFabricSetup_x64.exe')\r\n", "cd C:\\Install_dir \r\n", "New-Item \"install_sharepoint.bat\" -type File \r\n", "Add-Content install_sharepoint.bat \"C:\" \r\n", "Add-Content install_sharepoint.bat 'powershell.exe C:\\Install_dir\\Install_SharePoint.ps1' \r\n", "New-Item \"Install_SharePoint.ps1\" -type File \r\n", "Add-Content Install_SharePoint.ps1 'if(Test-Path \"C:\\Install_dir\\finished.log\"){' \r\n", "Add-Content Install_SharePoint.ps1 \"cd C:\\Install_dir \" \r\n", "Add-Content Install_SharePoint.ps1 \"}else{ \" \r\n", "Add-Content Install_SharePoint.ps1 'Start-Process C:\\Install_dir\\2013\\Setup.exe -args \"/config C:\\Install_dir\\2013\\Files\\SetupSilent\\config.xml\" -Wait'\r\n", "Add-Content Install_SharePoint.ps1 'cd C:\\Install_dir'\r\n", "Add-Content Install_SharePoint.ps1 'New-Item \"finish.log\" -type File'\r\n", "Add-Content Install_SharePoint.ps1 'Remove-Item \"C:\\Install_dir\\SharePoint.exe\"' \r\n", "Add-Content Install_SharePoint.ps1 'Remove-Item \"C:\\Install_dir\\2013\\*\" -recurse' \r\n", "Add-Content Install_SharePoint.ps1 'schtasks /delete /TN \"install_sharepoint\" /f'\r\n", "Add-Content Install_SharePoint.ps1 'ros-notify'\r\n", "Add-Content Install_SharePoint.ps1 \"}\" \r\n", "Start-Process C:\\Install_dir\\SharePoint.exe -args \"/extract:C:\\Install_dir\\2013 /quiet\" -Wait \r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/continue /unattended\" -Wait \r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/SQLNCli:C:\\Install_dir\\sqlncli.msi /continue /unattended\" -Wait\r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/IDFX:C:\\Install_dir\\Windows6.1-KB974405-x64.msu /continue /unattended\" -Wait\r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/Sync:C:\\Install_dir\\Synchronization.msi /continue /unattended\" -Wait\r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/AppFabric:C:\\Install_dir\\WindowsServerAppFabricSetup_x64.exe /continue /unattended\" -Wait \r\n", "Start-Process C:\\Install_dir\\MicrosoftIdentityExtensions-64.msi -args \"/quiet\" -Wait \r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/continue /unattended\" -Wait \r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/WCFDataServices:C:\\Install_dir\\WcfDataServices.exe /continue /unattended\" -Wait \r\n", "Start-Process C:\\Install_dir\\2013\\prerequisiteinstaller.exe -args \"/KB2671763:C:\\Install_dir\\AppFabric1.1-RTM-KB2671763-x64-ENU.exe /continue /unattended\" -Wait\r\n", "schtasks /create /TN \"install_sharepoint\" /RU administrator /RP \"", { "Ref": "Password" }, "\" /SC ONSTART /TR \"C:\\Install_dir\\install_sharepoint.bat\" \r\n", "ros-notify \r\n", "shutdown /r /f /t 1 \r\n" ] ] } ] }, "SecurityGroupId": { "Ref": "EcsSecurityGroup" }, "VSwitchId": { "Ref": "EcsVswitch" }, "ImageId": { "Ref": "ImageId" }, "InstanceType": { "Ref": "InstanceType" }, "Password": { "Ref": "Password" } }, "Metadata": { "ALIYUN::ROS::Designer": { "id": "62ed3480-152b-40d3-946d-4d19c0de7530" } } }, "EcsVpc": { "Type": "ALIYUN::ECS::VPC", "Properties": { "CidrBlock": { "Ref": "VpcCidrBlock" }, "VpcName": "Vpc-sharepoint" }, "Metadata": { "ALIYUN::ROS::Designer": { "id": "4dfdcadf-d55e-4085-af95-79d40005c3da" } } }, "EcsSecurityGroup": { "Type": "ALIYUN::ECS::SecurityGroup", "Properties": { "SecurityGroupIngress": [ { "Priority": 1, "PortRange": "3389/3389", "NicType": "intranet", "SourceCidrIp": "0.0.0.0/0", "IpProtocol": "tcp" } ], "VpcId": { "Ref": "EcsVpc" } }, "Metadata": { "ALIYUN::ROS::Designer": { "id": "f1c13fc6-e74d-477c-be14-9e24fd583b55" } } }, "RosWaitConditionHandle": { "Type": "ALIYUN::ROS::WaitConditionHandle", "Metadata": { "ALIYUN::ROS::Designer": { "id": "d3d24118-a044-4f1d-9684-758480e50a31" } } } }, "Outputs": { "InstanceId": { "Value": { "Fn::GetAtt": [ "SharePointServer", "InstanceId" ] } }, "PublicIp": { "Value": { "Fn::GetAtt": [ "SharePointServer", "PublicIp" ] } }, "SecurityGroupId": { "Value": { "Fn::GetAtt": [ "EcsSecurityGroup", "SecurityGroupId" ] } }, "VpcName": { "Value": { "Fn::GetAtt": [ "EcsVpc", "VpcId" ] } } } }
-
-
テンプレートパラメータを設定します。
-
テンプレートパラメーターの設定 ページで、スタックの名前を入力し、次の表の説明に従ってパラメーターを設定します。
セクション
パラメータ
説明
VPC
VPC CIDR Block
[192.168.0.0/16]を選択します。
VSwitch CIDR Block
192.168.0.0/24 を入力します。
ECS
VSwitch Availability Zone
必要に応じてアベイラビリティーゾーンを選択します (例:Zone G)。
[イメージ]
ECS インスタンスの作成に使用するイメージ ID を指定します。
SharePoint Image Download Path
手順 1 で取得した
sharepoint.exeファイルのオブジェクト URL を入力します。Instance Type
必要に応じてインスタンスタイプを選択します (例:
ecs.c5.large)。Instance Password
ECS インスタンスのカスタムログインパスワードを設定します。
-
[作成] をクリックします。
スタックの作成には約 40 分かかります。
-
-
ECS インスタンスにログインします。
-
[Stacks] ページで、作成したスタックの名前をクリックします。
-
[リソース] タブで、タイプが
ALIYUN::ECS::InstanceのSharePointServerリソースのリソース ID をクリックします。 -
ECS コンソールで、インスタンスを見つけ、接続 を [操作] 列でクリックします。次に、「インスタンスに接続」ダイアログボックスで、今すぐサインイン をクリックします。
-
-
SharePoint を確認します。
-
SharePoint 2013 の中央管理サイトを開きます。ユーザー名に
administrator、パスワードに設定したインスタンスパスワードを入力します。
-
-
SharePoint の中央管理サイトから、さまざまな機能を確認できます。
SharePoint の中央管理ホームページには、以下の管理モジュールがあります: Application Management (Web アプリケーションの管理、サイトコレクションの作成、サービス アプリケーションの管理、コンテンツ データベースの管理)、 System Settings (サーバーの管理、ファーム機能の管理、代替アクセス マッピングの構成)、 Monitoring (問題と解決策の確認、ジョブ状態の確認)、 Backup and Restore (バックアップの実行、バックアップからの復元、サイトコレクションのバックアップの実行)、 Security (ファーム管理者グループの管理、サービス アカウントの構成)、 Upgrade and Migration (ファーム ライセンス種別の変換、製品およびパッチのインストール状態の表示、アップグレード状態の表示)。