当前位置:网站首页>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, GreengrassV2TokenExchangeRole
Si 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:aws
C'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 :
边栏推荐
- 记录一个诡异的图片上传问题
- Abnova CSV monoclonal antibody solution
- Connectez Le projecteur
- Visual studio 2013 redistributable is installed, but MySQL installation fails
- jenkins汉化及汉化无效解决方案
- Graphics rendering pipeline
- Use of static library and dynamic library
- How to use commands to write file names (including paths) in folders to txt files
- Prompt to update to the latest debug version during vscode debugging
- keda 2.7.1 scaledJob 代码简要分析
猜你喜欢
Dataframe extracts data from a column and converts it into a list
Abnova CSV monoclonal antibody solution
Getting to know OpenGL
V4l2+qt video optimization strategy
shell学习记录(四)
cv==biaoding---open----cv001
Playful girl wangyixuan was invited to serve as the Promotion Ambassador for the global finals of the sixth season perfect children's model
FPGA实现图像二值形态学滤波——腐蚀膨胀
Differences and functions of TOS cos DSCP
Shell learning record (II)
随机推荐
Prompt to update to the latest debug version during vscode debugging
接口测试用例设计
Steps of program compilation precompile compilation assembly connection
关于strlen与sizeof的区别
LeetCode 41 ~ 50
Sweet cool girl jinshuyi was invited to be the spokesperson for the global finals of the sixth season perfect children's model
Command of gun make (4) rule
Theoretical speed calculation method of WiFi
Shell learning record (III)
Redis-SDS
Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) D. Felicity‘s Big Secret Revealed
shell学习记录(三)
Pointnet/Pointnet++学习
recv & send
Redis7.0 installation steps
高手常用的电脑快捷键
Disruptor (I) sequence
Connecting the projector
Data analysis - similarities and differences between C-end and b-end data analysis
cv==biaoding---open----cv001