Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mnrgreg/openfaas-gpo-create

Automate ActiveDirectory GroupPolicy create through OpenFaas HTTP API
https://github.com/mnrgreg/openfaas-gpo-create

Last synced: 7 days ago
JSON representation

Automate ActiveDirectory GroupPolicy create through OpenFaas HTTP API

Awesome Lists containing this project

README

        

### Create Funtion template scaffolding
```
faas-cli template pull https://github.com/openfaas-incubator/powershell-http-template
faas-cli new faas-gpoacl-create --lang powershell-http --gateway https://openfaas.services.west.nonprod.contoso.com
```

### Authenticate to OpenFaaS control plane
```
faas-cli login -g https://openfaas.services.west.nonprod.contoso.com/ -u admin --password-stdin
faas-cli version
faas-cli list -g https://openfaas.services.west.nonprod.contoso.com/
```

### Build and deploy function
```
htpasswd -c auth faas-gpoacl-create-token
kubectl create secret generic -n openfaas --from-file=auth faas-gpoacl-create-basic-auth
kubectl create -n openfaas -f ingress.yaml
kubectl create -n openfaas-fn -f secret.yaml
faas-cli build -f ./faas-gpoacl-create.yml
faas-cli push -f ./faas-gpoacl-create.yml
faas-cli deploy -f ./faas-gpoacl-create.yml
```

### Trigger Function
```json
curl -u 'faas-gpoacl-create-token:XXXXXXX' -s https://openfaas.services.west.nonprod.contoso.com/function/faas-gpoacl-create \
-d '{
"businessUnit": "TDS",
"application": "SANDBOX",
"environment": "nonprod",
"domain": "contoso.com",
"group": "lsa_linux_ops"
}'
```