Skip to content

Instantly share code, notes, and snippets.

View ilyas-it83's full-sized avatar
💭
I may be slow to respond.

Ilyas F ilyas-it83

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
for i in {1..5}
do
echo "creating $i certificate stared"
step ca certificate sampledev$i sampledev$i.crt sampledev$i.key --provisioner-password-file password.txt -f
openssl pkcs12 -export -out sampledev$i.pfx -inkey sampledev$i.key -in sampledev$i.crt -password pass:yourpassword
echo "creating $i certificate completed"
done
#!/bin/bash
echo "It works"
#!/bin/bash
echo "Starting the Azure IoT Edge Installation"
#apt-get repository configuration
curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list
sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/
#Install Microsoft GPG public key
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/
@ilyas-it83
ilyas-it83 / AzureIoTEdgeRaspberryPiSetup.sh
Created June 6, 2020 14:55
Azure IoTEdge RaspberryPi Setup
#!/bin/bash
echo "Installing Azure IoT Edge on Raspbian Stretch"
curl https://packages.microsoft.com/config/debian/stretch/multiarch/prod.list > ./microsoft-prod.list
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/
echo "Installing Container Runtime for Azure IoT Edge on Raspbian Stretch"
sudo apt-get update
sudo apt-get install moby-engine
sudo apt-get install moby-cli
@ilyas-it83
ilyas-it83 / certs.MD
Created June 24, 2019 04:27
Create Root and Intermediate Certs for Azure IoT Hub Device Provisioning Service

#Generate Root Certificate key.

openssl genrsa –out RootCA.key 4096 - Private

#Generate Root certificate.

openssl req –new –x509 –days 1826 –key RootCA.key –out RootCA.crt -outform PEM

{
"if": {
"not" : {
"field" : "tags",
"containsKey" : "dept"
}
},
"then" : {
"effect" : "deny"
}
{
"if" : {
"not" : {
"field" : "location",
"in" : ["eastus" , "centralus"]
}
},
"then" : {
"effect" : "allow"
}
@ilyas-it83
ilyas-it83 / ARM Policy.json
Created August 16, 2016 13:22
Azure Resource Manager Policy
{
"if" : {
<condition> | <logical operator>
},
"then" : {
"effect" : "deny | audit | append"
}
}