IT |
気になる、記になる… |
Google、公式ストアで「夏フェス」のセールを開催中 − 「Nest」シリーズなどを値下げ |
https://taisy0.com/2021/07/16/143141.html
|
google |
2021-07-16 12:49:05 |
IT |
気になる、記になる… |
Appleの整備済み商品情報 2021/7/16 |
https://taisy0.com/2021/07/16/143139.html
|
apple |
2021-07-16 12:34:57 |
AWS |
AWS Government, Education, and Nonprofits Blog |
Satellite imagery over Africa, a large-scale climate ensemble, and product listings with 3D renderings: The latest open data on AWS |
https://aws.amazon.com/blogs/publicsector/satellite-imagery-africa-large-scale-climate-ensemble-product-listings-3d-renderings-latest-open-data-aws/
|
Satellite imagery over Africa a large scale climate ensemble and product listings with D renderings The latest open data on AWSThe AWS Open Data Sponsorship Program makes high value cloud optimized datasets publicly available on AWS This quarter we released new or updated datasets including satellite imagery over Africa a large scale climate ensemble and product listings with D renderings Learn how you can put these open datasets to work |
2021-07-16 12:01:19 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
python:テキストエディタを作成中に発生した複数の問題点について |
https://teratail.com/questions/349873?rss=all
|
pythonテキストエディタを作成中に発生した複数の問題点について前置きこんにちは。 |
2021-07-16 21:56:36 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Raspberry Pi 4 のgccを、aarch64 対応した gccに入れ直したいがうまくいかない |
https://teratail.com/questions/349872?rss=all
|
RaspberryPiのgccを、aarch対応したgccに入れ直したいがうまくいかないRaspberrynbspPinbspBnbspbitnbspkernelnbspを試すを参考に、bitカーネル化を行いました。 |
2021-07-16 21:54:22 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【Keras】学習済みEfficientNetB0+全結合層に対して、model.summary()で全結合層の詳細を表示したい |
https://teratail.com/questions/349871?rss=all
|
【Keras】学習済みEfficientNetB全結合層に対して、modelsummaryで全結合層の詳細を表示したい前提・実現したいことKerasでファインチューニングしたモデル学習済みEfficientNetBnbspnbsp全結合層について以下のつを実現したいです。 |
2021-07-16 21:45:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
windows serverのイベントログ暗号化 |
https://teratail.com/questions/349870?rss=all
|
windowsnbspservernbspnbsp |
2021-07-16 21:38:18 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
javaのthrows Exceptionを全てのメソッドに追加した時に、どこにもキャッチされない場合、どういう処理がなされているのか? |
https://teratail.com/questions/349869?rss=all
|
javaのthrowsExceptionを全てのメソッドに追加した時に、どこにもキャッチされない場合、どういう処理がなされているのかすべてのメソッドにthrowsnbspExceptionを追加していますが、どこにもcatchしないで、プログラムがコンパイル成功する理由がわかりません。 |
2021-07-16 21:35:38 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
python tkinterのentryで文字挿入後カーソルを一つ後ろへ |
https://teratail.com/questions/349868?rss=all
|
pythontkinterのentryで文字挿入後カーソルを一つ後ろへ前提・実現したいことpythonnbsptkinterのentryでinsertによる文字挿入後にカーソルを一つ後ろへ下げるにはどうしたらよいでしょうか。 |
2021-07-16 21:31:13 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
laravel SQLERROR |
https://teratail.com/questions/349867?rss=all
|
laravelSQLERRORLaravelnbspSQLSTATESnbspColumnnbspnotnbspfoundnbspnbspUnknownnbspcolumnnbspaposfollowersidnbspaposnbspinnbspaposfieldnbsplistaposnbspSQLnbspinsertnbspintonbspfollowsnbspfollowidnbspfollowersidnbspnbspvaluesnbspnbspMysqlにはfollowidnbspとfollowersidnbspcolumnは存在しているのですが、上のようなエラーが起きてしまいます。 |
2021-07-16 21:13:53 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Mac OS CatalinaにおけるUnityの起動不可状態について |
https://teratail.com/questions/349866?rss=all
|
MacOSCatalinaにおけるUnityの起動不可状態について前提・実現したいことMacnbspOSnbspCatalinaでUnitynbspHubをダウンロードし、UnitynbspHubからUnityをインストールしたのですが、起動しようとすると読み込みはしても画面が一切出てきません。 |
2021-07-16 21:10:35 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Expressでejsに配列を渡して表示できません |
https://teratail.com/questions/349865?rss=all
|
Expressでejsに配列を渡して表示できません前提・実現したいことユーザーの名前とアイコンの表示発生している問題・エラーメッセージherokuでSNSを作っていますがnodejsからejsにusersテーブルからusernamとicon情報を渡して表示したいのですがなぜか表示されません。 |
2021-07-16 21:08:27 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Javascript if else 文を短縮し処理を軽くしたい |
https://teratail.com/questions/349864?rss=all
|
Javascriptifelse文を短縮し処理を軽くしたい現在、javascriptの学習でスプレットシートからタイムを取得し、条件付きで出力をする処理を行っております。 |
2021-07-16 21:08:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
TypeError: Class constructor FormApp cannot be invoked without 'new'を解決したい |
https://teratail.com/questions/349863?rss=all
|
TypeErrorClassconstructorFormAppcannotbeinvokedwithoutxnewxを解決したい前提・実現したいこと現在Reactの勉強をしています。 |
2021-07-16 21:06:23 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
MySQLでasという名前のテーブルを作成する方法 |
https://teratail.com/questions/349862?rss=all
|
MySQLでasという名前のテーブルを作成する方法環境LinuxnbspubuntumariaDBMySQLで「as」というテーブルを作成したいのですが、以下のSQLを実行してもas句として判定され作成できなく困っています。 |
2021-07-16 21:02:12 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
[Rails]テストコードを学ぼう①(初めの1歩) |
https://qiita.com/mkato1013/items/48870bc17580448fc256
|
matcher「expectの引数」と「想定した挙動」が一致しているかどうかを判断する。 |
2021-07-16 21:24:22 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
ECS on EC2にデプロイする際のポートに関する注意点 |
https://qiita.com/texpandafter/items/ea1be90dcdbf2100229b
|
動的ポートマッピングでマッピングされるポート範囲が上記のポート範囲だからです。 |
2021-07-16 21:59:37 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
tfstateがS3からダウンロードできない。 |
https://qiita.com/stakakey/items/9e94761767e827906fa1
|
はじめにtfstateファイルを保存するAWSアカウント、Terraformでリソースを作成するAWSアカウントのつのAWSアカウントでTerraform構築した際に、tfstateファイルをSからダウンロードできないってことがありましたので、原因を記載します。 |
2021-07-16 21:01:32 |
Azure |
Azureタグが付けられた新着投稿 - Qiita |
Azure Application Insights 料金節約術 - Web ページ解析編 |
https://qiita.com/hoisjp/items/e889b76fb9cb76344b68
|
このスクリプト上のcfgに最低限必要なinstrumentationKeyが設定されていますが、この箇所に以降で説明する構成を行っていくことで、このスクリプトが送信するログの量を小さくすることができます。 |
2021-07-16 21:02:18 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ECS on EC2にデプロイする際のポートに関する注意点 |
https://qiita.com/texpandafter/items/ea1be90dcdbf2100229b
|
動的ポートマッピングでマッピングされるポート範囲が上記のポート範囲だからです。 |
2021-07-16 21:59:37 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
[Rails]テストコードを学ぼう①(初めの1歩) |
https://qiita.com/mkato1013/items/48870bc17580448fc256
|
matcher「expectの引数」と「想定した挙動」が一致しているかどうかを判断する。 |
2021-07-16 21:24:22 |
海外TECH |
DEV Community |
Access the Amazon Elastic File System (EFS) from multiple VPC using VPC Peering |
https://dev.to/aws-builders/access-the-amazon-elastic-file-system-efs-from-multiple-vpc-using-vpc-peering-3kb9
|
Access the Amazon Elastic File System EFS from multiple VPC using VPC PeeringWhen there are different environments development quality production in AWS and we separate them in many VPC s or AWS accounts but need access to the same EFS Elastic File System we can apply a configuration with VPC Peering DefinitionsAmazon Elastic File System EFS Amazon Elastic File System Amazon EFS provides a simple serverless set and forget elastic file system that lets you share file data without provisioning or managing storage VPC peering A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv addresses or IPv addresses Instances in either VPC can communicate with each other as if they are within the same network For example We have two VPC in the same region with EFS connection using VPC Peering Steps Create VPC Peering Here I share a guide with information and configuration of the VPC Peering create vpc peering connection localFor example we create VPC Peering with the following network Name VPC A Name VPC B Later in the previous phase we configure and create EFS Here I share guide For example we create an EFS with ID fs dae on VPC Now we set up our EFS in Ubuntu Linux instance the network Before this we create a directory efs shared and we edit file etc fstab and add the following line fs dae efs us east amazonaws com efs shared nfs defaults netdev We check that it is set up EFS using the command df hNow we create a file with two lines And we repeat the previous step but now with the instance in VPC however for a successful connection we must make the last command s Open a Cloud Shell in the Virginia region then execute the following command aws efs describe mount targets file system id fs daeObtain the interface IP of the EFS and write the following command in the instance EC the VPC echo fs dae efs us east amazonaws com sudo tee a etc hostsLater we execute the same process and create directory efs shared and add it then set up the disk in etc fstab the instance EC with the following command mount efs shared Finally we verify if there is a file with the name test With these steps now we have obtained EFS access in the different VPC no matter where EFS are configured Recommendations Verify that the security group is attached to the EFS and available open port TCP VPC Peering has route tables that associate the connection with the EC instances For this example we use a network interface the EFS but you can use more interfaces in different subnets associated with the VPC You can connect VPC Peering with different AWS accounts and other regions in the same account however it is important that the networks are not the same because VPC Peering doesn t accept the equal networks |
2021-07-16 12:30:25 |
海外TECH |
DEV Community |
Creating a multi architecture CI/CD deployment for Amazon ECS and ECS Anywhere |
https://dev.to/aws/creating-a-multi-architecture-ci-cd-deployment-for-amazon-ecs-and-ecs-anywhere-15o3
|
Creating a multi architecture CI CD deployment for Amazon ECS and ECS AnywhereOrganisations are moving their workloads to the cloud as quickly as they can While most applications can be easily migrated to the cloud some applications need to remain on premises due to low latency or data sovereignty requirements Regardless of where workloads may reside organisations want to be able to develop once and be able to deploy workloads to the cloud or on premises in an agile and consistent fashion using a common set of APIs to manage and operate Furthermore enterprises need to be able to leverage investments in skills technology and processes across their environments This leads many enterprises to seek hybrid cloud architectures to integrate their on premises and cloud operations to support a broad spectrum of use cases In this post I am going to explore how you can deploy your application to both your own environment and the AWS Cloud We will take a simple application a Dockerised Spring Boot application and then automate the build and deployment of that application so that we can run it anywhere we want and on multiple processor architectures For this I am going to setup Amazon ECS and ECS Anywhere which allows you to run your ECS applications anywhere you want We will cover setting up a simple hybrid environment with my home network being a proxy for your own on premises environment and set up the site to site VPN and software components that enable us to seamlessly deploy our containerised applications on both our Cloud and our on premises servers This is what it will look like The kinds of use case and problems this will help you with include building my applications so they will work across different architecture types providing me with more choice and optionssimplifying and centralising my application builds so I can build once and deploy anywhere on any architecturemanage my containerised applications running either in AWS or within my own environments via ECS Anywhere provide additional deployment applications for applications that might have requirements to run locallyThis post will be in two parts The first part will look at setting up the multi architecture build pipeline that will take our sample Spring Boot application and then build it and deploy it to some target clusters running mixed x and AWS Graviton arm based instance types The second part will look at extending this model setting up the hybrid environment using ECS Anywhere and then using that to deploy the same application seamlessly What you will needYou can follow on with this post as I have published all the scripts and code so you can replicated this for yourself Find the GitHub repo here You will also need a developer environment that has the following An AWS Account with the right level of access Admin as well as the CodeCommit configuredAWS cliDocker running on your local environmentA Docker Hub account we will need to use this to pull down containers during the build process AWS CDK setup and running cdk version should be at least version CostI have been running this demo for about a week and it has cost me so about per day but I suspect if you get it up and running and then explore and remove everything it will cost a lot less These exclude any costs you might have for your local environment I will cover how to remove everything at the end as part of the clean up activities Part zero The applicationThe app we will be using is a simple Spring Boot application that will display a different logo based on what the underlying architecture is The application has been containerised and here is the DockerfileFROM amazoncorretto as builderCOPY srvWORKDIR srvRUN mvnw package spring boot repackageFROM amazoncorretto COPY from builder srv target spring boot demo jar srv EXPOSE ENTRYPOINT java jar srv spring boot demo jar When you access the application via a web browser it will display information about the underlying system that it is running on changing image based on the process architecture We can run this application on our local developer environment which we will see in a moment so you can see it running as you might typically do as part of your development workflow Part One Setting up the Multi architecture CI CD pipelineOverviewWe are going to set up the environment using Infrastructure as Code IaC and in this particular walkthrough I am going to use AWS CDK This will do the following setup the initial source code and container repositories via a setup scriptset up the networking infrastructure including the site to site VPN which we will use laterset up the Amazon ECS cluster deploying our applicationdeploy a CI CD pipeline that will automate the rebuilding and repacking of our application when changes are detected and deploy the latest version to our Amazon ECS ClusterThis is what it will look likeDocker HubWe need to create and store securely the Docker Hub username and password which will be used by the automation scripts We do not want to store these in the configuration files as we do not want to leak those to our source control systems We will store this using AWS Parameter Store and then reference these in our code we will run later We will create two parameters one for the Docker Hub username the other for the password In our code we reference these as springboot multiarch dockerhub username and springboot multiarch dockerhub password so if you change these remember to update the code where they are referenced To create your username password go to your Docker Hub account settings and create a new tokenI have created one called multi arch spring and it will generate a token You need to record this and keep it safe as we will use it in the next step From the command line lets store these using the following commands replacing the region where you want to deploy this solution and the password token aws ssm put parameter name springboot multiarch dockerhub username value multi arch spring type SecureString region your region where you will deploy this app aws ssm put parameter name springboot multiarch dockerhub password value your token type SecureString region your region where you will deploy this app From the AWS console if you go to the AWS Systems Manager Parameter Store you should now see these We are now ready to proceed Running the setup script Check out the repository on your developer machine In the example below I am checking the repository out after swtiching to a separate folder off my home folder in a directory called blog demo cd blog demo cd mkdir blog democd blog demogit clone cd blog multi arch springboot demo multiarch springboot multiarch Review the setup sh script changing the parameters at the top of the script so that they work for your own environment You MUST change the AWS DEFAULT REGION and AWS ACCOUNT the others you can leave if you want but are customisable Any changes will need to be updated in the CDK application which we will use later For the rest of this walk through I will use these values AWS DEFAULT REGION your AWS region AWS ACCOUNT your AWS account number AWS ECR REPO demo multiarch springboot ecsanywhereAWS CC REPO demo multiarch springboot ecsanywhereCOMMIT HASH abcdef Run the setup sh script which will Create a Code Commit repository Create an ECR repository and Build and publish the sample Spring Boot application in the ECR repository We are containerising this application as we will be using this container when we create the Amazon ECS cluster Running this script may take minutes or more depending on your internet speeds but you should see something like this your specific details will be different to the following The push refers to repository dkr ecr eu west amazonaws com demo multiarch springboot ecsanywhere test aebbbc Pushed create AWS ECR Repoadcdb Pushedecede Pushedabcdef arm digest sha fddafbffdeddbaeecfd size Created manifest list dkr ecr eu west amazonaws com demo multiarch springboot ecsanywhere test abcdef schemaVersion mediaType application vnd docker distribution manifest list v json manifests mediaType application vnd docker distribution manifest v json size digest sha adbbeabdccebeafabfcfbab platform architecture amd os linux mediaType application vnd docker distribution manifest v json size digest sha fddafbffdeddbaeecfd platform architecture arm os linux We now have our containerised application stored in Amazon ECR which we will use when we build our Amazon ECS cluster We are now going to populate the CodeCommit repository that was created We will create a new working directory to do thiscd blog demogit clone demo appcd demo appcp r blog demo blog multi arch springboot demo multiarch springboot multiarch You should now have a directory structure that looks like this├ーcdk app│ └ーecs anywhere│ ├ーapp py│ ├ーecs anywhere│ │ ├ーecs anywhere cicd py│ │ ├ーecs anywhere ecs py│ │ ├ーecs anywhere pipe py│ │ ├ーecs anywhere repo py│ │ └ーecs anywhere vpc py│ └ーrequirements txt├ーpipeline│ ├ーecs pipeline│ └ーeks pipeline├ーsetup sh└ーspringbootdemo ├ーDockerfile ├ーmvnw ├ーpom xml ├ーsrc │ └ーmain │ ├ーjava │ │ └ーhello │ │ ├ーApplication java │ │ └ーHelloController java │ └ーresources │ └ーstatic │ ├ーcss │ │ └ーstyle css │ └ーimages │ ├ーarm png │ ├ーaws png │ └ーintel png ├ーtarget ├ーtf demo json ├ーtf json └ーtf json template Commit this and then publish to the CodeCommit repositorygit add git commit m Initial upload git pushNote If you get prompted for username password then you may not have the CodeCommit Git helper configured Check out the documented linked above In your gitconfig file I have the following setup credential helper helper aws codecommit credential helper UseHttpPath true user email xxxx xxxx com name xxxx We will now change the default branch to Main This is much easier to do via the console where you go to the repository demo multiarch springboot ecsanywhere test create a branch main and then go to settings and make this the default branch Once you have done this switch to the main branch git pullgit checkout mainWe now have the application we can make updates too that will trigger our CI CD pipeline later on Now we can set that up Deploy the AWS resources via AWS CDK We are now ready to deploy the AWS resources using AWS CDK We go back to the first folder we checked out and go to the folder where the CDK app has been created We need to adjust the app py file which contains parameters to customise the demo for your environmentcd blog demo blog multi arch springboot demo multiarch springboot multiarch cdk app ecs anywhereWhen you look at the app py file you will need to change the env EU and the props from aws cdk import corefrom ecs anywhere ecs anywhere cicd import EcsAnywhereCICDStackfrom ecs anywhere ecs anywhere vpc import EcsAnywhereVPCStackfrom ecs anywhere ecs anywhere ecs import EcsAnywhereECSStackfrom ecs anywhere ecs anywhere pipe import EcsAnywherePipeStackfrom ecs anywhere ecs anywhere repo import EcsAnywhereLBStackenv EU core Environment region eu west account props mydcexternalip xx mydcinternalcidr awsvpccidr ecsclustername mydc ecs ecr repo demo multiarch springboot ecsanywhere code repo demo multiarch springboot multiarch image tag abcdef home pi app core App mydc vpc EcsAnywhereVPCStack scope app id ecs anywhere vpc env env EU props props mydc lb EcsAnywhereLBStack scope app id ecs anywhere lb env env EU vpc mydc vpc vpc props props mydc ecs cicd EcsAnywhereCICDStack scope app id ecs anywhere cicd env env EU vpc mydc vpc vpc props props mydc ecs pipe EcsAnywherePipeStack scope app id ecs anywhere pipe env env EU vpc mydc vpc vpc props props mydc ecs EcsAnywhereECSStack scope app id ecs anywhere cfn env env EU vpc mydc vpc vpc props props app synth The app py shows you the different stacks that you will need to deploy to build this demo The first thing we need to do is set the correct values env EU core Environment region your aws region account your aws account props mydcexternalip your external router IP you can find this via tools like what is my IP mydcinternalcidr your home network CIDR e g awsvpccidr your VPC CIDR range e g ecsclustername name for your ecs cluster e g mydc ecs ecr repo name of the ECR repo must match what you set in the setup sh e g demo multiarch springboot ecsanywhere code repo name of the CodeCommit repo must match what you setup above e g demo multiarch springboot multiarch image tag initial hash for ECR repo must match what you have setup above e g abcdef home pi the IP address of the Raspberry Pi you will be running your workloads on your local network Once you have amended this file and saved it we are ready to deploy the first stack To make sure it is all working as expect type the following cdk lsand you should see the following output which means we are ready to go ecs anywhere cfnecs anywhere pipeecs anywhere vpcecs anywhere cicdecs anywhere lbDeploy the VPC stack The first stack we will deploy is the VPC which will deploy and configure all the networking components Much of this will be used in Part Two To deploy cdk deploy ecs anywhere vpcyou should see something like this if successful You will need this info for Part Two so make sure you keep a record although you can view this information in the CloudFormation console ecs anywhere vpcOutputs ecs anywhere vpc ExportsOutputRefmydcvpnvpcCAECBB vpc eddbecs anywhere vpc ExportsOutputRefmydcvpnvpcprivateSubnetSubnetDADD subnet defdbebecs anywhere vpc ExportsOutputRefmydcvpnvpcprivateSubnetSubnetFD subnet abdabaeaecs anywhere vpc ExportsOutputRefmydcvpnvpcpublicSubnetSubnetBBFBCB subnet ebbfedecs anywhere vpc ExportsOutputRefmydcvpnvpcpublicSubnetSubnetECBCC subnet aabffbaecs anywhere vpc VPCId vpc eddbecs anywhere vpc VPGId vgw bcaaedaStack ARN arn aws cloudformation eu central stack ecs anywhere vpc afe ee eb fc cDeploy the Amazon ECS Cluster The next stage we will deploy the application into an Amazon ECS cluster This will create two EC instances one using x and the other using AWS Graviton instance types It will set up the application load balancer and create a service Once this has completed we will be able to access the application via the DNS name that is displayed in the output cdk deploy ecs anywhere cicdYou will see a review screen that shows the security changes this stack will deploy Answer Y to deploy After a while if you are successful you will see the following ecs anywhere cicdOutputs ecs anywhere cicd LoadBalancerEndpoint ecs a LBA UQZDWUB eu central elb amazonaws comStack ARN arn aws cloudformation eu central stack ecs anywhere cicd ca e eb afec You will now be able to access the application via the browser using the endpoint that is output In my example when I enter into my browser and refresh a few times I see the following If I refresh the page a few times you should see it change as your request is served up by a different container instance running on a different processor architectureWe have now deployed the application next step is to setup and deploy a CI CD so we can make changes and automate the process of building updates container images of our application and deploy this to this cluster Deploying the CI CD System From the command line we can deploy the CI CD setup with the following command cdk deploy ecs anywhere pipelineYou will see a review screen that shows the security changes this stack will deploy Answer Y to deploy After a while if you are successful you will see the following ecs anywhere pipeOutputs ecs anywhere pipe CodeCommitOutput Stack ARN arn aws cloudformation eu central stack ecs anywhere pipe f ea eb bf aecbeabThat is it you now have a CI CD setup that is going to build both x and arm container images of your application every time you change your code The CDK application builds the CodePipeline and CodeBuild steps ensures that the right permissions are defined and that it is integrated with the right source code repository to trigger the pipeline It does not configure what these steps will do however and for that we have some additional yml files where we configure the actual build steps In the source code repository you will find a directory called pipelines ecs pipeline which has three files armbuild yml amdbuild yml and post build yml These are the files that are used to create the specific actions that will be done by the automation They use environment variables including some we have set in the code to store values such as the ECS Cluster and Service name the Docker Hub username and password and the tag id used for the container repository Here is the post build yml file that takes the x and arm built containers creates the container manifest files tags them uploads them to the Amazon ECR repository and then finally kicks of the deployment to our ECS cluster version phases pre build commands echo Logging in to Amazon ECR aws version aws ecr get login region AWS DEFAULT REGION no include email COMMIT HASH echo CODEBUILD RESOLVED SOURCE VERSION cut c IMAGE TAG COMMIT HASH latest ARM TAG IMAGE TAG arm AMD TAG IMAGE TAG amd echo REPOSITORY URI echo IMAGE TAG echo AMD TAG echo ARM TAG export DOCKER CLI EXPERIMENTAL enabled build commands echo Build started on date echo Building the Docker manifest docker manifest create REPOSITORY URI IMAGE TAG REPOSITORY URI ARM TAG REPOSITORY URI AMD TAG docker manifest annotate arch arm REPOSITORY URI IMAGE TAG REPOSITORY URI ARM TAG docker manifest annotate arch amd REPOSITORY URI IMAGE TAG REPOSITORY URI AMD TAG docker manifest inspect REPOSITORY URI IMAGE TAG docker manifest push REPOSITORY URI IMAGE TAG post build commands cd springbootdemo sed i s ecr image REPOSITORY URI IMAGE TAG g tf json sed i s region AWS DEFAULT REGION g tf json sed i s log group ECS SN g tf json aws ecs register task definition cli input json file tf json TASK DEFINITON springboot cicd TASK REVISION aws ecs describe task definition task definition TASK DEFINITON egrep revision tr awk print sed s aws ecs update service cluster ECS CLUSTER service ECS SERVICE task definition TASK DEFINITON TASK REVISION aws ssm put parameter name demo ecsanywhere latestimage value IMAGE TAG type String overwriteLet s review what we have done so far Reviewing what we just didWe have used AWS CDK as well as some scripts to automate the deployment and configuration of our sample application into an Amazon ECS cluster and setup a simple CI CD pipeline If you go to the AWS Console and review the Pipelines under CodePipeline you should see that you now have a pipeline called ECSAnyWhere or if you modified the code what ever you renamed it to with a status of successful You can explore the build logs to see the output for each stage to see in more detail what is happening When we make changes to our application it kicks off the CI CD system which builds the application on both x and arm platforms and then deploys these on both x and Graviton instance types Check out the application repo locally and make some changes The code you can change is the HelloController java it will be n the springboot src main java hello directory and I suggest perhaps changing the version number or the text that is displayed Once you have committed the code when you go back to the CodePipeline screen you should see that the pipeline is kicking off It will take around minutes for the code to update and deploy to the ECS Cluster Once it has check both the application via the browser to see if your changes have been successful or the logs see below You can review the output of this via the CloudFormation console There will be a new CloudWatch log group which should have a log stream for each ECS instance so if you follow all the defaults there will be two When you open these log streams you should see the output as follows For the next part we are going to integrate with our on premises environment which in my case is my home network Part Two Setting up and integrating with your local environmentNow that we have our application the next stage is to integrate this with our own environment I am going to be doing the following Setup the local environment configuring the site to site VPN and all the additional software components neededDeploying the AWS resources we will set up an Amazon ECS cluster that will use the application we have just automatedIntegrate the on premises and AWS cloud environmentsRun our workloads testing them both in the Cloud and on premises There are a number of great blog posts I read whilst preparing this post which you should check out The first is from Romain Jourdan Secure Connection between AWS VPC and a Raspberry Pi but there are a few others that are worth mentioning This blog post from Nathan Peck Building an Amazon ECS Anywhere home lab with Amazon VPC network connectivity and this post Look ma I can run containers on Amazon ECS Anywhere ーOn premises or on the Cloud Finally this great post Setup Raspberry PI as AWS VPN Customer Gateway helped get me unstuck when I had VPN issues Make sure you check them out if you get stuck or want to dive a little deeper into this setup ArchitectureI am going to be using a Raspberry Pi as VPN Gateway setup on my local network I will use a different Raspberry Pi to run the application workloads If you have a different VPN Gateway for example if you are using a Unify type solution then check out this Romain Jourdan blog post above The only thing I have done on my home router is to create a Firewall DMZ which opens up the world to the Internet to a single host in my case a Raspberry Pi which I will host my VPN Gateway It is outside the scope of this post on how that is configured but it is a hardened secure configuration given it is exposed Updating the local Raspberry Pi sThe first thing I had to do was to update the firmware and kernel to latest version on the Raspberry Pi This is outside the scope of this post but if you get errors during the VPN setup with missing libraries it is likely they are the cause of the problem so make sure you update everything before proceeding You should do this at the start before you begin I was using two different kinds of Raspberry Pi s for the VPN Gateway I used an older Raspberry Pi Model Rev B running Raspbian but for the Workloads I had a later Raspberry pi Model I was running Ubuntu LTS This is the output once I had updated the Pi running the VPN Gatewayuname a outputLinux dmcpi v SMP Thu Jun BST armvl GNU LinuxThis is the output once I had updated the Pi running the workloadsuname aLinux ubuntu raspi Ubuntu SMP PREEMPT Thu Jun UTC aarch aarch aarch GNU LinuxOn the Pi running the workloads I needed to make a modifications to boot firmware cmdline txt to append the following cgroup enable memoryThis is what mine looked likenet ifnames dwc otg lpm enable console serial console tty root LABEL writable rootfstype ext elevator deadline rootwait fixrtc cgroup enable memoryOnce that change was done a reboot is required Setting up the local Raspberry Pi that will run the local VPN Gateway I needed to install some additional packages and dependencies On the Raspberry Pi that is going to be my VPN Gateway I run these commandssudo apt get updatesudo apt get install strongswan raspberrypi kernel headers lsofWe can check to see if this has been successful by running this commandsudo ipsec statusWhich should not return any errors This is now ready for connecting to our AWS VPN which we will now create so for the time being we will leave this and come back later Setting up the Site to Site VPN When we ran the cdk deploy ecs anywhere vpc it deployed and configured everything on the AWS side for the Site to Site VPN We now just need to configure the local VPN gateway Strongswan to set up the ipsec tunnels From the AWS console you can see this if you go to the VPC Site to Site Connections which should look something like this This information was provided in the parameter section of the app py file and the important details here now are the CIDR address ranges that need to match your local network for mine this is and the external IP address which is what the VPN tunnel from the AWS side is going to look to connect to If you are unsure what this is you can find it by googling my IP address make sure you are not connected to a VPN though otherwise you will get a different You will need to click on the DOWNLOAD CONFIGURATION highlighted above arrow and then select STRONGSWAN from the pull down menu There are only single options for PLATFORM SOFTWARE so click on the DOWNLOAD button which will download a text file You will now need to follow the instructions provided in that text file on your Raspberry Pi local gateway It should be pretty straight forward but might take you around minutes to complete For reference these are the steps I took Changed etc sysctl conf as per the various options documented and then reload this via sudo sysctl p Created the ipsec conf and added details for the two ipsec tunnelsCreated the ipsec secrets and added the shared secretsCreated the tunnel interfaces running these commands sudo ip link add Tunnel type vti local remote key sudo ip addr add remote dev Tunnelsudo ip link set Tunnel up mtu sudo ip route add dev Tunnel metric sudo iptables t mangle A FORWARD o Tunnel p tcp tcp flags SYN RST SYN j TCPMSS clamp mss to pmtusudo iptables t mangle A INPUT p esp s d j MARK set xmark sudo ip link add Tunnel type vti local remote key sudo ip addr add remote dev Tunnelsudo ip link set Tunnel up mtu sudo ip route add dev Tunnel metric sudo iptables t mangle A FORWARD o Tunnel p tcp tcp flags SYN RST SYN j TCPMSS clamp mss to pmtusudo iptables t mangle A INPUT p esp s d j MARK set xmark If you have run this successfully when you run the ifconfig a command you should now see two new interfaces Tunnel Link encap IPIP Tunnel HWaddr inet addr P t P Mask inet addr fe efe ca Scope Link UP POINTOPOINT RUNNING NOARP MTU Metric RX packets errors dropped overruns frame TX packets errors dropped overruns carrier collisions txqueuelen RX bytes B TX bytes B Tunnel Link encap IPIP Tunnel HWaddr inet addr P t P Mask inet addr fe efe ca Scope Link UP POINTOPOINT RUNNING NOARP MTU Metric RX packets errors dropped overruns frame TX packets errors dropped overruns carrier collisions txqueuelen RX bytes B TX bytes B And if we check the routing tables we should see we now have a path to our VPC on AWS via those interfaces netstat rnKernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface UG wlan U Tunnel U Tunnel U Tunnel U Tunnel U wlanNote This information is not persistent If you restart your Pi you will need to repeat these steps Read the text file for details of how you can persist the configuration We can now start the local Strongswan VPN by running the following command sudo ipsec startWhich we can check by runningsudo ipsec statusWe should now see that the VPN is starting and establishing the connection with the AWS VPN Gateway Security Associations up connecting Tunnel ESTABLISHED seconds ago Tunnel INSTALLED TUNNEL ESP in UDP SPIs cc i cfbf o Tunnel Tunnel ESTABLISHED seconds ago Tunnel INSTALLED TUNNEL ESP in UDP SPIs cf i cbfd o Tunnel Note If you see the following then it is likely that you have entered the ipsec conf ipsec security details incorrectly so review that information Security Associations up connecting Tunnel CONNECTING any any Tunnel CONNECTING any any We can verify that everything is working by going to the AWS Console and checking the status of the tunnel again You should see that the VPN tunnel is now up Route to AWSThere is one final thing we need to do On the Raspberry Pi that will be running our sample application it does not yet know how to route traffic to AWS via the VPN We need to add a static route sudo ip route add via This will route all traffic for AWS via the Raspberry Pi VPN gateway we just created Note This is quite an important step If the workload machine does not have a route back during the later sections of this blog post when you come to create a load balancer to this instance you will get errors because the Pi does not know how to route traffic via the VPN We have now finished the networking part and can move onto setting up our local workloads Note Whilst I was putting this together my broadband went down When it came back my external IP had changed I had to update the IP in the app py and then redeploy the ecs anywhere vpc stack to update everything Configuring and deploying AWS resourcesWe now have a secure connection between our AWS environment and our local environment We will come back to this in a moment Now we are going to setup our local Raspberry Pi workload machine so that it can become a host that can run our containerised applications and integrate with the Amazon ECS control plane This will involve creating a new ECS cluster in which we can register these EXTERNAL resources and then setting up the software on those local resources in my case the Raspberry Pi workload machine so that it can be managed by Amazon ECS Note Connectivity between AWS and our local environment is needed as the local instance is in essence being managed by the Amazon ECS control plane Whilst it can tolerate some down time after a few hours you will experience issues with your local environment Therefore this is not currently at least intended for disconnected infrequently connected environments We now need to go back to our developer machine where we ran t he CDK applications as part of Part One and run the following to deploy a new Amazon ECS cluster which we will use to register the EXTERNAL or hybrid ECS Anywhere instance cdk deploy ecs anywhere cfnYou will be prompted to review security settings repond Y and if successful you should see output like the following ecs anywhere cfnOutputs ecs anywhere cfn ECSAnyWhereIamRole ecs anywhere cfn mydcecsroleEFF AIPTJPecs anywhere cfn ECSClusterName mydc ecs extclusterStack ARN arn aws cloudformation eu central stack ecs anywhere cfn fbe efb eb ae caafacWe are going to use the values of ecs anywhere cfn ECSAnyWhereIamRole in a moment In my example here it is ecs anywhere cfn mydcecsroleEFF AIPTJPIf you go to the AWS console you will now see a new ECS cluster appear which should match the name in the output of ecs anywhere cfn ECSClusterName so in the above example this is mydc ecs extcluster Setting up the local Raspberry Pi that will run our ECS Anywhere workloads Log back into your local Raspberry Pi where you plan to run your workloads You will need to install the AWS cli and then configure with a set of AWS credentials I created a new IAM user for this purpose but this is up to you sudo apt get install awscliaws configure We now need to install the agent software onto this Raspberry Pi workload Before we do that though we need to get an activation code which we will use the IAM role we created above the output from the CDK app ecs anywhere ec ECSAnyWhereIamRole which in my example was ecs anywhere cfn mydcecsroleEFF AIPTJP aws ssm create activation iam role ecs anywhere cfn mydcecsroleEFF AIPTJP region region tee ssm activation jsonWhich generated the following output ActivationId cd cd c ea ccca ActivationCode vPEBrnyIQuOaWs Note Do not share these or store these electronically I have changed these values and they will not work Will need these values in a minute so lets create environment variablesexport id cd cd c ea ccca export code vPEBrnyIQuOaWs Once you have these values the clock is ticking You will have a short amount of time in which to run the script which will depend on how you have configured your AWS environment account timeouts To know if this is the cause of any issues you will see the following error in your logs like level error time T Z msg Unable to register as a container instance with ECS ExpiredTokenException The security token included in the request is expired n tstatus code request id fd ba ac ac module client golevel error time T Z msg Error registering ExpiredTokenException The security token included in the request is expired n tstatus code request id fd ba ac ac module agent go Run the following command which will download the ECS Anywhere installation script which does three things it installs the ECS Agent the SSM Agent and the Docker enginecurl proto https o ecs anywhere install sh When we ran the CDK script to provision the ECS cluster it output the name of the ECS Cluster so lets assign that to an environment variable as will need to use that in the next step export ecscluster mydc ecs extcluster We can now run the installation script to install and configure the required software components sudo bash ecs anywhere install sh region your AWS region cluster ecscluster activation id id activation code codeThis is going to take a few minutes whilst it downloads installs and configures the SSM and ECS agents on the Raspberry Pi If you see the following error make sure you have set your AWS region information correctly Error occurred fetching the seelog config file path open etc amazon ssm seelog xml no such file or directoryInitializing new seelog loggerNew Seelog Logger Creation Complete WARN Could not read InstanceFingerprint file InstanceFingerprint does not exist INFO No initial fingerprint detected generating fingerprint file ERROR Registration failed due to error registering the instance with AWS SSM InvalidActivation You should get output similar to the following Ping ECS Agent registered successfully Container instance arn arn aws ecs eu west container instance ecs anywhere ec mydcecsclusterBB rlmKClssuV dfbdadadadbbb You can check your ECS cluster here clusters ecs anywhere ec mydcecsclusterBB rlmKClssuV ok This script installed three open source packages that all use Apache License You can view their license information here ECS Agent SSM Agent Docker engine What just happened Well on your local in my case Raspberry Pi the script ecs anywhere install sh installs and configures the AWS SSM Agent as well as the ECS Anywhere agent The script will also install additional software for running your container applications for example Docker If we go to AWS System Manager gt Fleet Management we should now see our Raspberry Pi show up The ECS Agent has also been added as a resource to the ECS Cluster we created If we go to the AWS Console and look at the ECS Clusters we will see this new resource listed We can click on it to see more details about the available resources memory cpu processor etc that this instance providesWe can now deploy our application to this ECS cluster and it will get deployed onto our local Raspberry Pi and then be accessible via the local network in my case this is Deploying the application to your local ECS Anywhere cluster We will do this via the cli before we amend the CI CD system so that this is automatically done every time there is an update Note The first time that you launch the task the Raspberry Pi will need to download the container images so it will take longer to start the application and will vary depending on your internet connection If you notice your Task is in PENDING then this could be the reason The first thing we need to do is prep the task definion json file which we will use to create a new version of the task definition that was created during the AWS CDK ecs anywhere cfn deployment We create a file called tf any json as follows requiresCompatibilities EXTERNAL containerDefinitions name springboot remote image ecr image memory cpu essential true portMappings containerPort hostPort protocol tcp networkMode bridge family ecsanywhere We know what the latest container image is by looking in the ECR Repository When we come to automate this via CI CD these are passed as environment variables so we only need to do this now as we bootstrap the application for the first time export APP dkr ecr eu central amazonaws com demo springboot ecsanywhere beb sed i s ecr image APP g tf any jsonNote If you are using a Mac you will need to use sed i bak s ecr image APP g tf any json This will update the file with the container reference and has We can now register a new task definition I will use what we already have in the post build yml script LOCAL ECS CLUSTER mydc ecs extcluster LOCAL ECS SERVICE mydc ecs svc LOCAL TASK DEFINITON ecsanywhere aws ecs register task definition cli input json file tf any json region the region where the ECS cluster is running This will generate output similar to the following taskDefinition taskDefinitionArn arn aws ecs eu central task definition ecsanywhere containerDefinitions name springboot remote image dkr ecr eu central amazonaws com demo springboot ecsanywhere beb cpu memory portMappings containerPort hostPort protocol tcp essential true environment mountPoints volumesFrom family ecsanywhere networkMode bridge revision volumes status ACTIVE requiresAttributes name com amazonaws ecs capability ecr auth placementConstraints compatibilities EXTERNAL EC requiresCompatibilities EXTERNAL Now I need to grab the latest version from that output and then use that to update the running service LOCAL TASK REVISION aws ecs describe task definition task definition LOCAL TASK DEFINITON region the region where the ECS cluster is running egrep revision tr awk print sed s If we use echo LOCAL TASK REVISION you will see the new version number which we will use when we update the running service Now we have everything we need to update the service which we can do using the following command aws ecs update service cluster LOCAL ECS CLUSTER service LOCAL ECS SERVICE task definition LOCAL TASK DEFINITON LOCAL TASK REVISION region the region where the ECS cluster is running Which will give you something like service serviceArn arn aws ecs eu central service mydc ecs extcluster mydc ecs svc serviceName mydc ecs svc clusterArn arn aws ecs eu central cluster mydc ecs extcluster loadBalancers serviceRegistries status ACTIVE desiredCount runningCount pendingCount launchType EXTERNAL taskDefinition arn aws ecs eu central task definition ecsanywhere deploymentConfiguration deploymentCircuitBreaker enable false rollback false maximumPercent minimumHealthyPercent deployments id ecs svc status PRIMARY taskDefinition arn aws ecs eu central task definition ecsanywhere desiredCount pendingCount runningCount failedTasks createdAt updatedAt launchType EXTERNAL rolloutState IN PROGRESS rolloutStateReason ECS deployment ecs svc in progress id ecs svc status ACTIVE taskDefinition arn aws ecs eu central task definition ecsanywhere desiredCount pendingCount runningCount failedTasks createdAt updatedAt launchType EXTERNAL rolloutState IN PROGRESS rolloutStateReason ECS deployment ecs svc in progress id ecs svc status ACTIVE taskDefinition arn aws ecs eu central task definition ecsanywhere desiredCount pendingCount runningCount failedTasks createdAt updatedAt launchType EXTERNAL rolloutState COMPLETED rolloutStateReason ECS deployment ecs svc completed Accessing the application locally On your local network you can now access the application via your web browser on port When I access this on my network this is what I get Now that we know it works we can automate those steps and incorporate it within the CI CD system Updating the CI CD to deploy locallyTo do this all we need to do is update the post build step in the CI CD workflow The containers have already been built packaged so all we need is to add the following steps sed i s ecr image REPOSITORY URI IMAGE TAG g tf any json LOCAL ECS CLUSTER mydc ecs extcluster LOCAL ECS SERVICE mydc ecs svc aws ecs register task definition cli input json file tf any json LOCAL TASK DEFINITON ecsanywhere LOCAL TASK REVISION aws ecs describe task definition task definition LOCAL TASK DEFINITON egrep revision tr awk print sed s aws ecs update service cluster LOCAL ECS CLUSTER service LOCAL ECS SERVICE task definition LOCAL TASK DEFINITON LOCAL TASK REVISION These are already in the sample files but commented out This is because the post build script would have failed prior to us setting up the remote cluster We can now enable these and if you have changed any of the names make sure you update the values above To do this we check out the repository make the changes and then commit the changes Once committed this will trigger the build process The changes we will make are upload the new tf any json file to the springboot folder this is going to be updated every time a new container image is built and then used to register a new taskupdate the post build yml to include the steps above updating the tf any json file and then triggering the deploymentChange the following line in the code increasing the number so you can see that a new version has been deployedstr str concat lt p style text align center font family Arial gt Version lt p gt lt br gt n Once committed you should see the Pipeline trigger the build process Make sure you check out the logs in CodePipeline looking at the Post Build logs You will the new lines we added to the build script running the update and deploy to the local Raspberry Pi managed via ECS Anywhere After about minutes refresh the browsers for the local and the AWS load balanced version and they should both be at the same revision But wait they are not The ECS cluster on AWS has updated but not the local one What is going on Local Cluster vs AWS ClustersThe reason why the local ECS cluster has not updated is because there are no other instances to deploy the application onto We have two instances on AWS and these are rolled out one at a time validated and then the old one removed With our local instance we only have the single Raspberry Pi We will need to stop the running task The ECS Anywhere agent will then detect that it is not running and then start a new instance choosing the latest version that we just created To do this from the AWS Console go to the Amazon ECS Cluster view select the local cluster mine is called mydc ecs extcluster and then click on the TASKS tab Select the check box next to the running task and select STOP ignoring the warning If you try and access the application via a browser you will now get an error We have no running containers to service our requests After about minutes the ECS Service will realise there are no tasks running and kick off a new one Once this is up and running when we refresh you should now see that this is running the same version Adding more local capacityWe can easily address this issue by adding more local instances to the local ECS Cluster that is managed by ECS Anywhere Repeating the steps above I added another local machine this time my main Ubuntu desktop which is running on an old x machine I can see this has been successful as it now appears as a new ECS instance under the ECS instances tab When you now kick off a new build it will provision the task on the free instance check that it is up and running before draining session from the old applicationIf we wanted too we could increase the number of instances we want this cluster to support when we set it up via the CDK application we defined we wanted the desired count to be one If we go back to that code update the number to two and redeploy service ecs CfnService self f props ecsclustername svc service name f props ecsclustername svc cluster f props ecsclustername extcluster launch type EXTERNAL desired count task definition ecsanywhere task to string We can now see we have this cluster with running running tasks spread across the two different local ECS instances managed by ECS Anywhere And now we have them both runningWe are nearly finished just one last thing Accessing the application via an AWS Load BalancerIt would be great if we could now access the application via a load balancer in the cloud Why would we do that Perhaps we want to leverage a Cloud based application load balancer rather than deploying and managing our own one This would allow us to deploy more local machines and then ECS Anywhere would be able to deploy those applications across those instances No more manually stopping tasks We can automate that with some more CDK code and adding a new item in the props file so we do not need to hard code the entry local lb security group ec SecurityGroup self Load Balance internal Springboot http access vpc vpc local lb security group add ingress rule ec Peer any ipv ec Port tcp local lb security group add egress rule ec Peer ipv f props mydcinternalcidr ec Port tcp lb elbv ApplicationLoadBalancer self LB vpc vpc internet facing True security group local lb security group listener lb add listener Listener port open True remotepi elbv IpTarget f props home pi port availability zone all listener add targets Target port targets remotepi To kick this off we just runcdk deploy ecs anywhere lbAnd after a few minutes you should see the following output ecs anywhere lbecs anywhere lb deploying ecs anywhere lb creating CloudFormation changeset ecs anywhere lbOutputs ecs anywhere lb PiRemoteLB ecs a LBA UMQHFMJZEX eu central elb amazonaws comStack ARN arn aws cloudformation eu central stack ecs anywhere lb fbe eca eb be fbebYou will see that it outputs the DNS name of the Load Balancer created which we can put into our browser When we put ecs a LBA UMQHFMJZEX eu central elb amazonaws com into our browser we see our glorious application again Note We only added one of the local nodes but we can add both which we will see in the next section ImprovementsCongratulations you have come to the end of this post and walk through As always this is just the start and I hope that you take the time to explore the code and build upon it and improve it for your own use cases One thing that I did manage to do via the console but have not figured out yet how to do via my CDK application is to incorporate the local Raspberry Pi into the first ECS cluster Do do this I first uninstalled the previous step cdk destroy ecs anywhere lbOnce this finished I then went to the AWS console found the Target Group that had the existing EC instances registered one running on x instance types the other AWS Graviton and then registered manually my local Raspberry Pi using the settings of the VPC created as part of this application the IP address of the local Raspberry Pi and the other local machine the port they are listening to I then added this to the cluster When that completed it came back as unhealthy Why This is to be expected and shows the security groups working The original ECS Cluster has a security group setup that controls access from the Application Load Balancer to the EC instances on the target port That was for the subnet that those instances were on not my local network which is on a CIDR I needed to add a new rule that would allow the Application Load Balancer to health check and route traffic so I added a new rule in my instance updating sg abcdedbce to enable TCP port access to the CIDR range Once that was completed I now had three healthy targets And now when refreshing the original link we can see we have all four different hosts servicing requests Managing your local ECS Anywhere clusterI thought it would be useful to share some of the things I found useful when administering the local ECS Anywhere instance Managing the agentTo shutdown restart and get a status you can use the following commandssudo systemctl stop ecssudo systemctl status ecssudo systemctl start ecsExample output ecs service Amazon Elastic Container Service container agent Loaded loaded lib systemd system ecs service enabled vendor preset enabled Active active running since Mon UTC days ago Docs Main PID amazon ecs init Tasks limit Memory M CGroup system slice ecs service └ー usr libexec amazon ecs init startLog filesIf you want to find the log files then these are located in var log ecs ecs agent logecs init logYou can view the ECS agent initialisation logs as well as the operational logs Other key filesThe name of the ECS Cluster can be found in etc ecs ecs config You may need to update remove this as you experiment If you are trying this and run into the following error level critical time T Z msg Data mismatch saved cluster dc pi ecs cluster does not match configured cluster ecs anywhere ec mydcecsclusterBB HBnIvIpvQm Perhaps you want to delete the configured checkpoint file module agent goWhen the agent starts perhaps because this is a subsequent installation or you have changed values then you may need shutdown your ECS agent move rename the following file var lib ecs data agent db and then restart to recover You may also need to move rename the var lib amazon ssm if you get issues around the agent failing to install on subsequent attempts If you are seeing errors like this in your hibernate log ERROR Health ping failed with error error occurred in RequestManagedInstanceRoleToken AccessDeniedException Authentication failed status code request id afbe ed fa a cbfThe shut down your agent uninstall move or rename that directory and re run the script Cleaning upRemoving the AWS resourcesWe can clean up what we have created by running the following commands cdk destroy ecs anywhere lbcdk destroy ecs anywhere cfncdk destroy ecs anywhere pipecdk destroy ecs anywhere cicdcdk destroy ecs anywhere vpcOnce this has completed you will then manually need to delete the following AWS resources AWS CodeCommit and ECR repositories as these will not be deletedAWS System Manager Parameter Store values for the Docker Hub user name and password and the ECS Cluster detailsCleaning up your local environmentsudo systemctl stop amazon ssm agentsudo systemctl stop ecsRemove the ECS Anywhere and SSM agentssudo apt remove amazon ecs initsudo apt remove amazon ssm agentRemove the Strongswan software from the Pi VPN Gatewaysudo apt remove strongswanYou should can also remove the etc ecs config file which may not be removed when the package is installed as well as cleaning up the var lib ecs folder too And your environment should now be disconnected from AWS Systems Manager and Amazon ECS ConclusionIn this post I have shown you one way in which you can automate the creation of multiple architecture and deployment options for your containerised applications integrating with ECS Anywhere to provide you with more choices as to where you deploy those workloads There are many ways the scripts could be improved but I hope that these will save you some time as you look to automate your deployment processes I will hope to build on this post with future posts which add update the existing CDK applications to cover adding security to the application automating the provisioning of SSL certificates and a friendly DNS nameintegrating other applications or services we might need to use as part of our applicationwhat would you like to see Lastly I would be grateful if you could provide me with some short feedback on this walkthrough Please complete this very short survey here Please let me know if you find this post useful and how you might use this kind of setup Are you exploring moving your workloads to arm processing architectures Are you looking to explore hybrid scenarios where you deploy a single application across different environments Made with ️ |
2021-07-16 12:08:59 |
Apple |
AppleInsider - Frontpage News |
MagSafe Battery Pack, iPad mini vs Kindle, iPhone water resistance on the AppleInsider podcast |
https://appleinsider.com/articles/21/07/16/magsafe-battery-pack-ipad-mini-vs-kindle-iphone-water-resistance-on-the-appleinsider-podcast?utm_medium=rss
|
MagSafe Battery Pack iPad mini vs Kindle iPhone water resistance on the AppleInsider podcastApple released its MagSafe Battery Pack we compare the advantages of using iPad mini over Kindle for ebooks and try out water resistance limitations for iPhone and Apple Watch Apple released its official MagSafe Battery Pack for use with the iPhone lineup Physically smaller than third party alternatives the new Battery Pack also has a smaller capacity coming in at mAh We examine what this really means for charging capability plus its reverse wireless charging feature Both returning from time at the beach your hosts discuss the various water resistance features of iPhone and Apple Watch In its support documentation Apple specifies what activities are not recommended such as taking a shower with Apple Watch although many users have done so without issue Read more |
2021-07-16 12:52:23 |
Apple |
AppleInsider - Frontpage News |
Tim Cook attends 'Ted Lasso' season premiere |
https://appleinsider.com/articles/21/07/16/tim-cook-attends-ted-lasso-season-premiere?utm_medium=rss
|
Tim Cook attends x Ted Lasso x season premiereApple CEO Tim Cook joined the stars of hit Apple TV comedy Ted Lasso at the show s special second season premiere in Los Angeles Jason Sudeikis left with Tim CookAhead of its launch on July the second season of Ted Lasso was premiered at the Pacific Design Center in Los Angeles Cast creators and Apple s own Tim Cook met with a specially invited audience to watch the opening episode Read more |
2021-07-16 12:16:47 |
金融 |
金融庁ホームページ |
人事異動(令和3年7月16日発令)を掲載しました。 |
https://www.fsa.go.jp/common/about/jinji/index.html
|
人事異動 |
2021-07-16 14:00:00 |
金融 |
金融庁ホームページ |
NISA・ジュニアNISA口座の利用状況に関する調査結果について公表しました。 |
https://www.fsa.go.jp/policy/nisa/20210716.html
|
調査結果 |
2021-07-16 14:00:00 |
海外ニュース |
Japan Times latest articles |
Suga holding out hope for some spectators at Tokyo Paralympics |
https://www.japantimes.co.jp/news/2021/07/16/national/suga-interview-olympics/
|
minister |
2021-07-16 21:50:11 |
海外ニュース |
Japan Times latest articles |
Ugandan athlete training in Osaka ahead of Olympics goes missing |
https://www.japantimes.co.jp/news/2021/07/16/national/uganda-athlete-missing/
|
izumisano |
2021-07-16 21:07:41 |
ニュース |
BBC News - Home |
Europe floods: At least 120 dead and hundreds unaccounted for |
https://www.bbc.co.uk/news/world-europe-57858829
|
europe |
2021-07-16 12:15:18 |
ニュース |
BBC News - Home |
Covid infections are high and rising around the UK |
https://www.bbc.co.uk/news/health-57863343
|
covid |
2021-07-16 12:40:32 |
ニュース |
BBC News - Home |
Warnings grow about staff forced to self-isolate |
https://www.bbc.co.uk/news/business-57820537
|
medical |
2021-07-16 12:31:34 |
ニュース |
BBC News - Home |
UK weather: Heat-health alert issued in England for weekend |
https://www.bbc.co.uk/news/uk-57858950
|
warmer |
2021-07-16 12:39:36 |
ニュース |
BBC News - Home |
Boris Johnson's university friend gets ethics watchdog rule |
https://www.bbc.co.uk/news/uk-politics-57860969
|
processes |
2021-07-16 12:45:51 |
ニュース |
BBC News - Home |
GB News says presenter Guto Harri breached standards by taking the knee |
https://www.bbc.co.uk/news/entertainment-arts-57862332
|
english |
2021-07-16 12:29:57 |
ニュース |
BBC News - Home |
In pictures: Floods kill dozens in Germany and Belgium |
https://www.bbc.co.uk/news/world-europe-57858826
|
belgium |
2021-07-16 12:56:31 |
サブカルネタ |
ラーブロ |
旭川ラーメン さくら亭 正油篇 |
http://feedproxy.google.com/~r/rablo/~3/9xov8mReeJ4/single_feed.php
|
旭川ラーメン |
2021-07-16 13:14:03 |
北海道 |
北海道新聞 |
置戸で国内最高の35.3度 道内10人が救急搬送 |
https://www.hokkaido-np.co.jp/article/568000/
|
救急搬送 |
2021-07-16 21:10:45 |
北海道 |
北海道新聞 |
クマに襲われ乳牛3頭死ぬ 厚岸町の町営牧場 |
https://www.hokkaido-np.co.jp/article/568004/
|
厚岸町セタニウシ |
2021-07-16 21:15:00 |
北海道 |
北海道新聞 |
京都・宇治川の鵜飼、2年ぶりに かがり火照らす鵜匠の妙技 |
https://www.hokkaido-np.co.jp/article/568002/
|
京都府宇治市 |
2021-07-16 21:13:00 |
北海道 |
北海道新聞 |
首相「不安与えた」と陳謝 西村氏の酒類提供制限の発言 |
https://www.hokkaido-np.co.jp/article/567944/
|
共同通信社 |
2021-07-16 21:05:00 |
北海道 |
北海道新聞 |
ワクチン問題、新システムに一因 2種併存で在庫把握困難 |
https://www.hokkaido-np.co.jp/article/567999/
|
新型コロナウイルス |
2021-07-16 21:08:00 |
北海道 |
北海道新聞 |
待機の3000会場、8月本格化 河野氏、ワクチン職場接種で |
https://www.hokkaido-np.co.jp/article/567998/
|
河野太郎 |
2021-07-16 21:08:00 |
北海道 |
北海道新聞 |
札幌市の観光客、前年度62%減の570万人 20年度 コロナで過去最少 |
https://www.hokkaido-np.co.jp/article/567996/
|
過去 |
2021-07-16 21:07:00 |
北海道 |
北海道新聞 |
ユネスコ世界遺産委が開幕 日本の候補26、27日審査予定 |
https://www.hokkaido-np.co.jp/article/567997/
|
世界遺産 |
2021-07-16 21:07:00 |
コメント
コメントを投稿