Difference between revisions of "Publish Project to AWS"
From MgmtWiki
(→Solution) |
(→Solution) |
||
Line 11: | Line 11: | ||
# Now the deployment manifest file and a directory of all the files to be loaded up to the AWS elasticbeanstalk a ready for creating the deployment bundle. | # Now the deployment manifest file and a directory of all the files to be loaded up to the AWS elasticbeanstalk a ready for creating the deployment bundle. | ||
# Run the Powershell script that creates the zip file of the code to install the soltuion and the zip that up with the deployment manifest. | # Run the Powershell script that creates the zip file of the code to install the soltuion and the zip that up with the deployment manifest. | ||
− | # | + | # Upload the deployment bundle to the S3 instance for the app in AWS |
+ | # Open the AWS Explorer in Visual Studio (fro the View tab at the top ribbon) | ||
+ | # Navigate to the S3 file just uploaded and right click on the file, then click on "Create Pre-signed URL" | ||
# | # | ||
Revision as of 22:03, 5 June 2020
Full Title or Meme
Build and zip a Visual Studio dot net core 2.1+ Project for publication to Amazon Web Services.
Context
Problems
Solution
From the website Deploying an ASP.NET core application with Elastic Beanstalk.
- Prepare a project with all dependencies marked.
- Add a deployment file (see section below)
- from Powershell type "dotnet publish" (this and future commands are typed in the project directory)
- Now the deployment manifest file and a directory of all the files to be loaded up to the AWS elasticbeanstalk a ready for creating the deployment bundle.
- Run the Powershell script that creates the zip file of the code to install the soltuion and the zip that up with the deployment manifest.
- Upload the deployment bundle to the S3 instance for the app in AWS
- Open the AWS Explorer in Visual Studio (fro the View tab at the top ribbon)
- Navigate to the S3 file just uploaded and right click on the file, then click on "Create Pre-signed URL"
Deployment File
- From the website Running multiple applications and ASP.NET core applications with a deployment manifest
- name file aws-windows-deployment-manifest.json in the project directory with "Build Action" : "Content" and "Copy to Output Directory" : "Copy always"
- Bundle the manifest and site archive in a ZIP archive to create a source bundle.
{ "manifestVersion": 1, "deployments": { "aspNetCoreWeb": [ { "name": "my-dotnet-core-app", "parameters": { "archive": "dotnet-core-app.zip" } } ] } }
Example dotnet-core-bundle.zip -- aws-windows-deployment-manifest.json -- dotnet-core-app.zip
PS C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer> dotnet publish Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... All projects are up-to-date for restore. SimpleService -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\SimpleService\bin\Debug\netcoreapp3.1\SimpleService.dll CredStore -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\CredStore\bin\Debug\netcoreapp3.1\CredStore.dll MonitorService -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\MonitorService\bin\Debug\netcoreapp3.1\MonitorService.dll RegistryServer -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer\bin\Debug\netcoreapp3.1\RegistryServer.dll RegistryServer -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer\bin\Debug\netcoreapp3.1\publish\ PS C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer>