当前位置:网站首页>Tarte aux framboises + AWS IOT Greengrass
Tarte aux framboises + AWS IOT Greengrass
2022-06-26 02:05:00 【Dexterlien】
Documents de référence
Enregistrement du processus
Préparation de l'installation automatiséeIAMAutorisations nécessaires
https://docs.amazonaws.cn/en_us/greengrass/v2/developerguide/provision-minimal-iam-policy.html
Configuré localement pouraws cliConfirmer leIAM user
aws sts get-caller-identity
Viens.IAMCréez d'abord unpolicy. Attention au remplacementaccount-id Pour votre propre compte ID, GreengrassV2TokenExchangeRoleSi modifié, Il est nécessaire d'installer le --tes-role-name Les noms indiqués plus loin sont les mêmes ( Pas besoin de changer. , C'est le nom par défaut sans paramètre ). Notez également que arn:aws-cn Avec ce qui est écrit dans le document arn:awsC'est différent, Attention aux modifications
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CreateTokenExchangeRole",
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:CreatePolicy",
"iam:CreateRole",
"iam:GetPolicy",
"iam:GetRole",
"iam:PassRole"
],
"Resource": [
"arn:aws-cn:iam::account-id:role/GreengrassV2TokenExchangeRole",
"arn:aws-cn:iam::account-id:policy/GreengrassV2TokenExchangeRoleAccess"
]
},
{
"Sid": "CreateIoTResources",
"Effect": "Allow",
"Action": [
"iot:AddThingToThingGroup",
"iot:AttachPolicy",
"iot:AttachThingPrincipal",
"iot:CreateKeysAndCertificate",
"iot:CreatePolicy",
"iot:CreateRoleAlias",
"iot:CreateThing",
"iot:CreateThingGroup",
"iot:DescribeEndpoint",
"iot:DescribeRoleAlias",
"iot:DescribeThingGroup",
"iot:GetPolicy"
],
"Resource": "*"
},
{
"Sid": "DeployDevTools",
"Effect": "Allow",
"Action": [
"greengrass:CreateDeployment",
"iot:CancelJob",
"iot:CreateJob",
"iot:DeleteThingShadow",
"iot:DescribeJob",
"iot:DescribeThing",
"iot:DescribeThingGroup",
"iot:GetThingShadow",
"iot:UpdateJob",
"iot:UpdateThingShadow"
],
"Resource": "*"
}
]
}
Oui.policyAppliquer àaws cli Utilisateurs utilisés par l'Association
SSHÀ la tarte aux framboises
# Installationjre(11)
sudo apt install -y default-jre
# Créer un utilisateur
sudo useradd --system --create-home ggc_user
sudo groupadd --system ggc_group
# ModifiercgroupsParamètres de démarrage
sudo vi /boot/cmdline.txt
# Ajouter ce qui suit à la fin
cgroup_enable=memory cgroup_memory=1 systemd.unified_cgroup_hierarchy=0
# Redémarrage terminé
sudo reboot
# Après le redémarrage, utilisez la configuration ci - dessus IAM policyDeuserDeAK/SK Variables d'environnement du système de configuration de l'information
export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxxx
# Télécharger le paquet d'installation
cd ~
curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip && unzip greengrass-nucleus-latest.zip -d GreengrassCore
# Vérifiez dans le paquet d'installation GreenGrassInformations sur la version
java -jar ./GreengrassCore/lib/Greengrass.jar --version
# AWS Greengrass v2.5.6
# Effectuer l'installation
sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassCore/lib/Greengrass.jar --aws-region cn-north-1 --thing-name GreengrassRaspberryPi --component-default-user ggc_user:ggc_group --provision true --setup-system-service true --deploy-dev-tools true
Sortie pendant l'installation :
Provisioning AWS IoT resources for the device with IoT Thing Name: [GreengrassRaspberryPi]...
Found IoT policy "GreengrassV2IoTThingPolicy", reusing it
Creating keys and certificate...
Attaching policy to certificate...
Creating IoT Thing "GreengrassRaspberryPi"...
Attaching certificate to IoT thing...
Successfully provisioned AWS IoT resources for the device with IoT Thing Name: [GreengrassRaspberryPi]!
Setting up resources for aws.greengrass.TokenExchangeService ...
TES role alias "GreengrassV2TokenExchangeRoleAlias" does not exist, creating new alias...
TES role "GreengrassV2TokenExchangeRole" does not exist, creating role...
IoT role policy "GreengrassTESCertificatePolicyGreengrassV2TokenExchangeRoleAlias" for TES Role alias not exist, creating policy...
Attaching TES role policy to IoT thing...
No managed IAM policy found, looking for user defined policy...
No IAM policy found, will attempt creating one...
IAM role policy for TES "GreengrassV2TokenExchangeRoleAccess" created. This policy DOES NOT have S3 access, please modify it with your private components' artifact buckets/objects as needed when you create and deploy private components
Attaching IAM role policy for TES to IAM role for TES...
Configuring Nucleus with provisioned resource details...
Downloading Root CA from "https://www.amazontrust.com/repository/AmazonRootCA1.pem"
Created device configuration
Successfully configured Nucleus with provisioned resource details!
Creating a deployment for Greengrass first party components to the device
Configured Nucleus to deploy aws.greengrass.Cli component
Creating user ggc_user
ggc_user created
Creating group ggc_group
ggc_group created
Added ggc_user to ggc_group
Successfully set up Nucleus as a system service
Une fois l'installation réussie, vous pouvez Amazon IoT Voir l'état de l'appareil dans la console :
边栏推荐
- 标定。。。
- How to efficiently complete daily tasks?
- Redis的使用
- Connectez Le projecteur
- cyclegan:unpaired image-to-image translation using cycle-consistent adversarial network
- Finding the sum of N multiplications
- 通俗易懂C語言關鍵字static
- Characteristics and related specificity of Papain
- Chemical properties and application of trypsin
- Gun make (3) Rules for makefile
猜你喜欢

一分钟了解同步、异步、阻塞和非阻塞的区别

通俗易懂C語言關鍵字static

The answer skills and examples of practical cases of the second construction company are full of essence

vs2015+PCL1.8.1+qt5.12-----(1)

Visual studio 2013 redistributable is installed, but MySQL installation fails

Sweet girl lisixia was invited to be the little host of the global finals of the sixth season perfect child model

Pre ++, post ++ and pre -- and post -- (+a, a++ and --a, a--)

Disruptor (I) sequence

FPGA实现图像二值形态学滤波——腐蚀膨胀

recv & send
随机推荐
宁要一个完成,不要千万个开始(转载自豆瓣)
LeetCode 31 ~ 40
记录一个诡异的图片上传问题
Tengwenze, a hot-blooded boy, was invited to serve as the image ambassador of the global finals of the sixth season perfect children's model
Convert Weishi camera pictures
NDK20b FFmpeg4.2.2 编译和集成
A lost note for konjaku beginner
Pointnet/Pointnet++学习
wifi 的理论速度计算方法
求n的乘阶
cv==biaoding---open----cv001
字节序问题
关于strlen与sizeof的区别
17.11 std:: atomic continuation, std:: async in-depth discussion
Detailed explanation of WiFi related knowledge
Finding the sum of N multiplications
Find the multiplication order of n
Exploring temporary information for dynamic network embedding
biggan:large scale gan training for high fidelity natural image synthesis
Dataframe to list