GithubHelp home page GithubHelp logo

classicvalues / deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from syam12/deploy

0.0 0.0 0.0 8.81 MB

Teradici Cloud Access Manager

Home Page: https://www.teradici.com/products/cloud-access/cloud-access-manager

License: MIT License

PowerShell 83.63% Shell 5.78% HTML 10.59%

deploy's Introduction

What is Cloud Access Manager?

Teradici Cloud Access Manager is a cloud service that simplifies and automates deployments of Cloud Access Software.

Deploying Cloud Access Manager

The Cloud Access Manager solution is deployed in your Microsoft Azure subscription by running a few instructions in an Azure PowerShell Cloud Shell session. Click on the following link for Cloud Access Manager documentation:

Instructions for deploying Cloud Access Manager

Creating your own fork of Cloud Access Manager

Running the deployment script will deploy the latest version of the CACv1 connector. If for some reason you wish to not use the latest version, you can create your own fork of the deployment script, Azure templates, and required binaries for deployment in order to lock the version. A fork of this repo can be created by clicking the "Fork" button at the top of this page.

Copying Artifacts and Binaries to Azure Storage Blob

This section outlines how to ensure that Cloud Access Connectors deployments are always the same version and stable, and are only updated after an internal review by copying the required artifacts and binaries to the Azure Storage Blob:

  1. Create a publicly accessible copy of the https://github.com/teradici/deploy repository.
  2. Create a public file store to store the required binaries for example, Azure Blob storage or S3 bucket.
  3. In Azure, create a Storage Account. Names must be globally unique to Azure:
New-AzureRmResourceGroup -Name <ResourceGroupName> -Location <Location>
$acct = New-AzureRmStorageAccount -ResourceGroupName <ResourceGroupName> -AccountName <StorageAccountName> -Location <Location> -SKuName "Standard_LRS" -EnableHttpsTrafficOnly $false
  1. Within that Storage Account create a container and set the permissions to be at the container level so that everything in it is publicly accessible.
$container = New-AzureStorageContainer -Name <ContainerName> -Context $acct.Context -ErrorAction Stop -Permission Container
  1. Upload the following files to the container:
  2. Copy the binaries using this CloudShell script:
mkdir -p $home/clouddrive/binaries/agent
cd $home/clouddrive/binaries
$binaries = @(
"https://teradeploy.blob.core.windows.net/binaries/pcoip-broker.war",
"https://teradeploy.blob.core.windows.net/binaries/CloudAccessManager.war",
"https://teradeploy.blob.core.windows.net/binaries/CM_SG.zip",
"https://teradeploy.blob.core.windows.net/binaries/Install-PCoIPAgent.ps1.zip",
"https://teradeploy.blob.core.windows.net/binaries/Install-DC-and-CA.ps1.zip",
"https://teradeploy.blob.core.windows.net/binaries/Install-ConnectionServer.ps1.zip",
"https://teradeploy.blob.core.windows.net/binaries/apache-tomcat-8.5.57-windows-x64.zip",
"https://teradeploy.blob.core.windows.net/binaries/451.48_grid_win10_server2016_server2019_64bit_international.exe",
"https://teradeploy.blob.core.windows.net/binaries/NVIDIA-Linux-x86_64-430.46-grid.run",
"https://teradeploy.blob.core.windows.net/binaries/jdk-8u144-windows-x64.exe",
"https://teradeploy.blob.core.windows.net/binaries/Win64OpenSSL_Light-1_0_2o.exe")
ForEach ($binary in $binaries) {
    $fileName = ($binary -Split "/")[-1]
    Invoke-WebRequest `
        -Uri $binary `
        -OutFile $fileName
    Set-AzureStorageBlobContent `
        -Container $container.Name `
        -Context $acct.Context `
        -Blob "$fileName" `
        -File "./$fileName" `
        -Force
}
$agentBinaries = @(
"https://teradeploy.blob.core.windows.net/binaries/agent/latest-graphics-agent.json",
"https://teradeploy.blob.core.windows.net/binaries/agent/latest-standard-agent.json",
"https://teradeploy.blob.core.windows.net/binaries/agent/lis-rpms.x86_64.tar.gz",
"https://teradeploy.blob.core.windows.net/binaries/agent/usb-vhci.noarch.rpm",
"https://teradeploy.blob.core.windows.net/binaries/agent/xorg-x11-drv-teravfb.el7.x86_64.rpm",
"https://teradeploy.blob.core.windows.net/binaries/agent/pcoip-agent-graphics.el7.x86_64.rpm",
"https://teradeploy.blob.core.windows.net/binaries/agent/pcoip-agent-graphics.exe",
"https://teradeploy.blob.core.windows.net/binaries/agent/pcoip-agent-standard.el7.x86_64.rpm",
"https://teradeploy.blob.core.windows.net/binaries/agent/pcoip-agent-standard.exe")
ForEach ($binary in $agentBinaries) {
    $fileName = ($binary -Split "/")[-1]
    Invoke-WebRequest `
        -Uri $binary `
        -OutFile "./agent/$fileName"
    Set-AzureStorageBlobContent `
        -Container $container.Name `
        -Context $acct.Context `
        -Blob "agent/$fileName" `
        -File "./agent/$fileName" `
        -Force
}
  1. Run the Deploy-CAM.ps1 script as you normal but specify the location of the source and binary files as follows:
cd $home/clouddrive
Invoke-Webrequest -usebasicparsing "https://raw.githubusercontent.com/<yourGithubAccount>/deploy/master/Deploy-CAM.ps1" -OutFile Deploy-CAM.ps1
./Deploy-CAM.ps1 -binaryLocation <BaseUrlForContainer> -CAMDeploymentTemplateURI "https://raw.githubusercontent.com/<yourGithubAccount>/deploy/master/azuredeploy.json"

Creating a DSC Zip File

This section outlines how to create a DSC zip file for the Cloud Access Connector for Azure:

  1. Download the following required dependencies:
  2. Create a folder with the DSC script at the root level.
  3. Add each dependency to seperate folders, for example for Install-ConnectionServer the structure should look like:
    • dscmetadata.json
    • Install-ConnectionServer.ps1
    • xPSDesiredStateConfiguration\โ†’ The contents of xPSDeiredStateConfiguration v7.0.0.1.tar.gz\xPSDesiredStateConfiguration-7.0.0.
  4. The dscmetadata.json files is a simple JSON file that details location information for where to load modules from.
  5. Zip ip the contents of the folders and name them appropriately.

Build DSC Zip Files with CloudShell

You can also run the following script in CloudShell to build the DSC zip files:

$gitRepo="https://github.com/teradici/deploy.git"
$storageAccountName="<StorageAccountName>"
$stogareAccountResourceGroupName="<ResourceGroupName>"
$containerName="<ContainerName>"
mkdir -p $home/clouddrive/DSC/Install-PCoIPAgent
mkdir -p $home/clouddrive/DSC/Install-ConnectionServer
mkdir -p $home/clouddrive/DSC/Install-DC-and-CA
cd $home/clouddrive/DSC
git clone $gitRepo
 
cp ./deploy/remote-workstations/new-agent-vm/Install-PCoIPAgent.ps1 ./Install-PCoIPAgent/
cp ./deploy/connection-service/new-admin-vm/Install-ConnectionServer.ps1 ./Install-ConnectionServer/
cp ./deploy/root/configure-dc-and-ca/Install-DC-and-CA.ps1 ./Install-DC-and-CA/
cp -r ./deploy/root/configure-dc-and-ca/cDisk/ ./Install-DC-and-CA/
 
Invoke-WebRequest -Uri https://github.com/dsccommunity/xPSDesiredStateConfiguration/archive/v7.0.0.tar.gz -OutFile xPSDesiredStateConfiguration.tar.gz
mkdir xPSDesiredStateConfiguration
tar xf ./xPSDesiredStateConfiguration.tar.gz -C xPSDesiredStateConfiguration --strip-components 1
 
Invoke-WebRequest -Uri https://github.com/dsccommunity/ActiveDirectoryDsc/archive/v2.16.0.tar.gz -OutFile xActiveDirectory.tar.gz
mkdir xActiveDirectory
tar xf ./xActiveDirectory.tar.gz -C xActiveDirectory --strip-components 1
 
Invoke-WebRequest -Uri https://github.com/dsccommunity/ActiveDirectoryCSDsc/archive/v1.2.0.tar.gz -OutFile xAdcsDeployment.tar.gz
mkdir xAdcsDeployment
tar xf ./xAdcsDeployment.tar.gz -C xAdcsDeployment  --strip-components 1
 
Invoke-WebRequest -Uri https://github.com/PowerShell/xDisk/archive/1.0-PSGallery.tar.gz -OutFile xDisk.tar.gz
mkdir xDisk
tar xf ./xDisk.tar.gz -C xDisk --strip-components 1
 
Invoke-WebRequest -Uri https://github.com/dsccommunity/NetworkingDsc/archive/v5.2.0.tar.gz -OutFile xNetworking.tar.gz
mkdir xNetworking
tar xf ./xNetworking.tar.gz -C xNetworking --strip-components 1
 
cp -r xPSDesiredStateConfiguration ./Install-PCoIPAgent/
cp -r xPSDesiredStateConfiguration ./Install-ConnectionServer/
cp -r xActiveDirectory ./Install-DC-and-CA/
cp -r xAdcsDeployment ./Install-DC-and-CA/
cp -r xDisk ./Install-DC-and-CA/
cp -r xNetworking ./Install-DC-and-CA/
 
'{"Modules":["xPSDesiredStateConfiguration"]}' | Out-File ./Install-PCoIPAgent/dscmetadata.json
'{"Modules":["xPSDesiredStateConfiguration"]}' | Out-File ./Install-ConnectionServer/dscmetadata.json
'{"Modules":["xActiveDirectory","xAdcsDeployment","xDisk","xNetworking","cDisk"]}' | Out-File ./Install-DC-and-CA/dscmetadata.json
  
cd ./Install-PCoIPAgent
zip -qr ../Install-PCoIPAgent.ps1.zip .
cd ../Install-ConnectionServer
zip -qr ../Install-ConnectionServer.ps1.zip .
cd ../Install-DC-and-CA
zip -qr ../Install-DC-and-CA.ps1.zip .
cd ..
 
$dscs = @(
"Install-PCoIPAgent.ps1.zip",
"Install-DC-and-CA.ps1.zip",
"Install-ConnectionServer.ps1.zip")
 
$acct =  Get-AzureRmStorageAccount -Name $storageAccountName -ResourceGroupName $stogareAccountResourceGroupName
ForEach ($dsc in $dscs) {
    Set-AzureStorageBlobContent `
        -Container $containerName `
        -Context $acct.Context `
        -Blob "$dsc" `
        -File "./$dsc" `
        -Force
}

License

Copyright (c) 2018 Teradici Corporation. All rights reserved.

With the exception of content based off of the Azure Quickstart Templates, the contents of this repository are otherwise licensed under the MIT license.

Azure Quickstart Templates are copyright (c) Microsoft Azure and licensed under the MIT license.

deploy's People

Contributors

bdyck avatar cptera avatar devin-white avatar dimaharris avatar fariaserick avatar fwang-teradici avatar ivpetrov87 avatar jackyycheng avatar msweeney1955 avatar rohml avatar roy-satadru avatar sergeyuwt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.