All Products
Search
Document Center

Object Storage Service:Create a SharePoint 2013 application by using OSS and ROS

Last Updated:Mar 08, 2024

You can compile stack templates to describe cloud computing resources such as Elastic Compute Service (ECS) and ApsaraDB RDS instances and the dependencies between resources in the stack templates by using Resource Orchestration Service (ROS). The ROS engine creates and configures all resources in a stack based on a template, which enables automated deployment and O&M. This topic describes how to create SharePoint 2013 by using Object Storage Service (OSS) and ROS.

Note

The examples in this topic are provided by an Alibaba Cloud user and are used for reference only.

Prerequisites

  • An OSS bucket whose access control list (ACL) is private is created. For more information about how to create a bucket, see Create buckets.

  • The sharepoint.exe file is downloaded.

Step 1: Upload the sharepoint.exe file to the bucket

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.

  3. In the navigation tree, choose Object Management > Objects.

  4. Upload the downloaded sharepoint.exe file.

    Set the ACL to Public Read and keep the default settings for other parameters. For more information about how to upload an object, see Upload objects.

  5. Obtain the object URL.

    After you upload the file, click View Details on the right side of the sharepoint.exe file and click Copy Object URL.

    fileurl

Step 2: Create a stack by using ROS

  1. Select the template that you want to use to create a stack.

    1. Log on to the ROS console.

    2. In the left-side navigation pane, click Stacks.

    3. In the top-navigation par, select China (Hangzhou) from the region drop-down list.

    4. On the Stacks page, click Create Stack and select Use ROS from the drop-down list.

    5. In the Select Template step of the Create Stack wizard, select Select an Existing Template, set Template Import Method to Enter Template Content, enter the following content in the JSON editor, and click Next.

      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Description": "One simple ECS instance with SharePoint Foundation2013, default image is win2008r2_sp1_x64_ent_zh-cn_40G_alibase_20200116.vhd,The user needs to specify the instance type ",
        "Parameters": {
          "VpcCidrBlock": {
            "Type": "String",
            "Description": {
              "en": "The IP address range of the VPC in the CIDR Block form; <br>you can use 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>",
               
            },
            "AllowedValues": [
              "192.168.0.0/16",
              "172.16.0.0/12",
              "10.0.0.0/8"
            ],
            "Label": {
              "en": "VPC CIDR Block",
               
            },
            "Default": "192.168.0.0/16"
          },
          "VSwitchCidrBlock": {
            "Type": "String",
            "Description": {
               
              "en": "Subnet of the created virtual switch. It must be a sub-network segment of the proprietary network and cannot be occupied by other vSwitches."
            },
            "Label": {
               
              "en": "VSwitch CIDR Block"
            },
            "Default": "192.168.0.0/16"
          },
          "ZoneId": {
            "Type": "String",
            "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
            "Description": {
              "en": "Availability zone ID,<br><b>Note: <font color='blue'>Before selecting, please confirm that the Availability Zone supports the specification of creating ECS resources</font></b>",
               
            },
            "Label": {
               
              "en": "VSwitch Available Zone"
            }
          },
          "SharePointDownloadPath": {
            "Label": {
               
              "en": "SharePoint Image Download Path"
            },
            "Type": "String",
            "Description": {
               
              "en": "SharePoint Foundation2013 image download path, see detail: <a href='https://docs.microsoft.com/en-us/OfficeUpdates/sharepoint-updates' target='_blank'><b><font color='blue'>SharePoint Foundation2013 image download path</b></font></a>"
            }
          },
          "ImageId": {
            "Default": "win2008r2_sp1_x64_ent_zh-cn_40G_alibase_20200116.vhd",
            "Label": {
               
              "en": "Image ID"
            },
            "Type": "String",
            "Description": {
               
              "en": "Image ID, About SharePoint Foundation2013 system requirements, see detail: <a href='https://docs.microsoft.com/en-us/sharepoint/install/hardware-and-software-requirements-0' target='_blank'><b><font color='blue'>SharePoint Foundation2013 system requirements</b></font></a>"
            }
          },
          "InstanceType": {
            "Type": "String",
            "Description": {
               
              "en": "Fill in the specifications that can be used under the vSwitch availability zone;</b></font><br>General specifications: <font color='red'><b>ecs.c5.large</b></font><br>Note: some zones do not support general specifications<br>Details: <a href='https://www.alibabacloud.com/help/en/doc-detail/25378.html' target='_blank'><b><font color='blue'>Overview of instance families</font></a></b>"
            },
            "Label": {
               
              "en": "Instance Type"
            },
            "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
            "AssociationPropertyMetadata": {
              "ZoneId": "ZoneId"
            }
          },
          "Password": {
            "NoEcho": true,
            "Type": "String",
            "Description": {
              "en": "Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
               
            },
            "AllowedPattern": "[0-9A-Za-z\\_\\-\\&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$",
            "Label": {
               
              "en": "Instance Password"
            },
            "ConstraintDescription": {
              "en": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
               
            },
            "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: Window application service: Create a Windows instance for SharePoint2013 by using OSS and ROS"
            ]
          }
        },
        "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"
              ]
            }
          }
        }
      }
  2. Configure the template.

    1. In the Configure Template Parameters step, configure Stack Name and other parameters. The following table describes the parameters.

      Section

      Parameter

      Description

      VPC

      VPC CIDR block

      Select 192.168.0.0/16.

      VSwitch CIDR Block

      Enter 192.168.0.0/24.

      ECS

      VSwitch Available Zone

      Select a vSwitch availability zone based on your business requirements, such as Zone G.

      Image ID

      The ID of the image used to create the ECS instance.

      SharePoint Image Download Path

      Enter the URL of the sharepoint.exe object. You can obtain the URL of sharepoint.exe from Step 1.

      Instance Type

      Select an instance type based on your business requirements, such as ecs.c5.large.

      Instance Password

      Create a password for connecting to the ECS instance.

    2. Click Create.

      It takes approximately 40 minutes to create a stack.

  3. Log on to the instance.

    1. Click the stack that you created.

    2. Click the Resources tab. Then, click the resource ID of SharePointServerALIYUN::ECS::Instance.

      instance

    3. In the ECS console, click Connect on the right of the instance. In the Remote connection dialog box, click Sing in now under Workbench.

  4. Use SharePoint.

    1. Open the SharePoint 2013 admin center, enter the default username "administrator" and ECS instance logon password.

  5. Try SharePoint features.