diff --git a/cloud/Makefile.mk b/cloud/Makefile.mk index a6da37086..83bd33e62 100644 --- a/cloud/Makefile.mk +++ b/cloud/Makefile.mk @@ -1,29 +1,72 @@ +# cloud/websites/Makefile.mk +# +# Cloud deployment makefile +# +# $ make cloud-deploy +# +# AWS - Update AWS S3 buckets *.gridlabd.us +# +# $ make aws-deploy +# +# The *-dev.gridlabd.us websites are updated for all +# branches except "master", which updates *.gridlabd.us +# +# Options: +# +# AWS_OPTIONS=--dryrun do not update websites +# +# GCP - No GCP resources are updated at this time +# +# $ make gcp-deploy +# +# AZ - No AZ resources are updated at this time +# +# $ make az-deploy +# -cloud-deploy: aws-deploy gcp-deploy azure-deploy +# +# Cloud deployment platforms +# -WEBSITES = code$(SUFFIX).gridlabd.us docs$(SUFFIX).gridlabd.us www$(SUFFIX).gridlabd.us +cloud-deploy: aws-deploy gcp-deploy az-deploy +# +# Get a list of files that have to be updated +# + +WEBSITES=$(shell find cloud/websites/*.gridlabd.us -type d -prune) + +# +# Target that forces updates +# + +FORCE: + +# +# AWS hosts the main websites to sync +# aws-deploy: $(WEBSITES) -$(WEBSITES) : -if HAVE_AWSCLI -if SUFFIX - @echo "deploying $@ for SUFFIX='$(SUFFIX)'..." -else - @echo "cannot deploy $@ for SUFFIX='$(SUFFIX)'" -endif -endif -# if SUFFIX -# @echo "aws s3 cp cloud/websites/$@/index.html s3://$@/index.html" -# @echo "aws s3api put-object-acl --bucket $@ --key index.html --acl public-read" -# endif +# +# Target *-dev.gridlabd.us for all branches except "master" +# +AWS_TARGET=$(if $(subst master,,$(shell git rev-parse --abbrev-ref HEAD)),-dev,) + +# +# Websites that should be sync'd +# + +%.gridlabd.us: FORCE + @echo "syncing $(subst .gridlabd.us,$(AWS_TARGET).gridlabd.us,$(notdir $@)) with AWS_OPTIONS='$(AWS_OPTIONS)' ..." + @aws s3 sync $@ s3://$(subst .gridlabd.us,$(AWS_TARGET).gridlabd.us,$(notdir $@)) $(AWS_OPTIONS) --acl public-read + +# +# GCP updates +# gcp-deploy: -if HAVE_GCPCLI - @echo "WARNING: gcp-deploy is not implemented yet" -endif - -azure-deploy: -if HAVE_AZCLI - @echo "WARNING: azure-deploy is not implemented yet" -endif + +# +# Azure updates +# +az-deploy: diff --git a/cloud/websites/tutorials.gridlabd.us/index.html b/cloud/websites/tutorials.gridlabd.us/index.html new file mode 100644 index 000000000..5e12d6e95 --- /dev/null +++ b/cloud/websites/tutorials.gridlabd.us/index.html @@ -0,0 +1,101 @@ + + + + HiPAS GridLAB-D Tutorials + + + + + + + +
+

HiPAS GridLAB-D Training Video Library

+ +
+ Session playing: + + (View slides: ) +
+ + + +
+ + + HiPAS GridLAB-D Version 4.3 Tutorials +
+ Copyright © 2022, Regents of the Leland Stanford Junior University +
+ +
diff --git a/cloud/websites/tutorials.gridlabd.us/library.csv b/cloud/websites/tutorials.gridlabd.us/library.csv new file mode 100644 index 000000000..eb4ffc2b5 --- /dev/null +++ b/cloud/websites/tutorials.gridlabd.us/library.csv @@ -0,0 +1,5 @@ + +User Tutorials + +Developer Tutorials +developer/session1,Introduction,27 diff --git a/cloud/websites/tutorials.gridlabd.us/style.css b/cloud/websites/tutorials.gridlabd.us/style.css new file mode 100644 index 000000000..3f6f7356a --- /dev/null +++ b/cloud/websites/tutorials.gridlabd.us/style.css @@ -0,0 +1,21 @@ +body { + background: lightgrey; +} + +h1 { + color: blue; +} + +button { + color: white; + border-radius: 4px; +} + +select + font-size: 18px Arial; +} + +cite +{ + font-size: 10; +} \ No newline at end of file diff --git a/docs/Resources.md b/docs/Resources.md index 0277d2548..70734a2fd 100644 --- a/docs/Resources.md +++ b/docs/Resources.md @@ -23,3 +23,7 @@ This GitHub project contains libraries of GLM object that can be used in GridLAB ## [Examples](https://github.com/hipas/gridlabd-examples) This GitHub project contains example GLM files that illustrate various ways of using GridLAB-D. + +## [Tutorials](http://tutorials.gridlabd.us/index.html) + +The user and develop tutorials are posted online in both MP4 and PDF format.