Skip to content

Instantly share code, notes, and snippets.

@jonathanmtran
Last active May 11, 2019 01:56
Show Gist options
  • Save jonathanmtran/11ef90cb53b75efdc59958b1373a0e83 to your computer and use it in GitHub Desktop.
Save jonathanmtran/11ef90cb53b75efdc59958b1373a0e83 to your computer and use it in GitHub Desktop.
Fiosan "Quickstart"

Fiosan "Quickstart"

Setup

Create a folder to hold the Fiosan repos (e.g. $HOME/Documents/fiosan). We will call this path $FIOSAN_ROOT.

CAS

There are two ways to set up a basic instance of CAS: Docker Image (requires CPP account) or from scractch using uPortal-start.

Docker Image (requires CPP account)

Download the uP-start-cas Docker image from https://livecsupomona-my.sharepoint.com/:u:/g/personal/jmt_cpp_edu/EYWW_5JEqexKvK-0J6Y31-oBKdFghiQeOe2SI_WkZ8Wa4Q?e=29f5d0

Import the image:

# docker image load < uP-start-cas.tar.gz

Start a container with the newly imported container:

# docker run -d -p 8080:8080 --name uP-start-cas aee4831ecacd

This container takes some time to start. Once it's ready, CAS will be available at http://localhost:8080/cas

From Scratch Using uPortal-start

The following commands will clone the uPortal-start repo, start HSQL, deploy CAS, and initalize the HSQL database while not deploying the uPortal itself into Tomcat.

$ cd $FIOSAN_ROOT
$ git clone git@github.com:Jasig/uPortal-start.git
$ cd uPortal-start
$ ./gradlew hsqlStart tomcatInstall overlays:cas:tomcatDeploy
$ ./gradlew -Dserver.home=.gradle/tmp -Dportal.home=.gradle/tomcat/portal overlays:uPortal:dataInit

Start Tomcat with the following command

$ cd $FIOSAN_ROOT/uPortal-start
$ .gradle/tomcat/bin/catalina run

Clone the repositories

$ cd $FIOSAN_ROOT
$ git clone git@github.com:drewwills/notification-ms.git -b restore-oauth2
$ git clone git@github.com:drewwills/notification-ui.git -b restore-oauth2

Microsoft SQL Server

See notification-ui/README.git for the Docker command to start MSSQL.

Start the Microservice

$ cd $FIOSAN_ROOT/notificaion-ms
$ mvn -Drun.jvmArguments="-Duk.ac.ed.notify.security.basicAuthPassword=CHANGEME" clean spring-boot:run

Configure and Start the UI

$ cd $FIOSAN_ROOT/notification-ui

Apply the changes from notification-ui-required.diff. Optionally, apply the changes from notification-ui-optional.diff to remove UoE-specific elements.

Start the UI

$ mvn -Drun.jvmArguments="-Duk.ac.ed.notify.security.basicAuthPassword=CHANGEME" clean spring-boot:run

If everything is working the way it should, you should be able to browse to http://localhost:8090 and authenticate as admin/admin.

diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index 0f82dad..5ffc5a3 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -63,44 +63,6 @@
</nav>
- <div class="jumbotron headercontainer">
- <div class="container">
- <div class="row">
- <div class="col-sm-7 col-md-8">
- <a href="http://www.ed.ac.uk/">
- <img src="../webjars/edgel-webjar/2.0.1/gel/images/logo.png" alt="The University of Edinburgh home" />
- </a>
- </div>
-
- <div role="search" class="col-sm-5 col-md-4 uoe-search-block">
- <p>
- <a href="//www.ed.ac.uk/schools-departments/">
- <span class="glyphicon glyphicon-chevron-right"></span>
- Schools &amp; departments
- </a>
- </p>
- <form class="form-inline uoe-search-form" action="//www.ed.ac.uk/search" method="get">
- <div class="form-group">
- <label for="uoe-search" class="sr-only">Search:</label>
- <div class="input-group">
- <input type="text" placeholder="Search"
- class="form-control" data-items="4"
- data-provide="typeahead" name="q" id="uoe-search">
- <span class="input-group-btn">
- <button class="btn btn-uoe">
- <span class="glyphicon glyphicon-search"></span>
- <span class="sr-only">Search</span>
- </button>
- </span>
- </div>
- </div>
- </form>
- </div>
-
- </div>
- </div>
- </div>
-
<div class="jumbotron home-hero" >
<div class="container">
@@ -118,74 +80,6 @@
<div ng-view class="container content"></div>
- <footer>
-
- <div class="discover-uni">
- <div class="container">
- <h3>The University of Edinburgh</h3>
- </div>
- </div>
-
- <div class="footer">
- <div class="container">
- <div class="row">
- <div class="col-sm-4 col-md-4">
- <ul>
- <li><a href="http://www.ed.ac.uk/about/website/website-terms-conditions">Terms
- &amp; conditions</a></li>
- <li><a href="http://www.ed.ac.uk/about/website/privacy">Privacy
- &amp; cookies</a></li>
- </ul>
- </div>
-
- <div class="col-sm-4 col-md-4">
- <ul>
- <li><a href="http://www.ed.ac.uk/about/website/accessibility">Website
- accessibility</a></li>
- <li><a href="http://www.ed.ac.uk/about/website/freedom-information">Freedom
- of information publication scheme</a></li>
- </ul>
- </div>
- <div class="col-sm-4 col-md-4 col-xs-6">
- <a href="//www.ed.ac.uk/about/mission-governance/affiliations">
- <img class="pull-right img-responsive"
- alt="University affiliations"
- src="../webjars/edgel-webjar/2.0.1/gel/images/footer-affiliations.png" />
- </a>
- </div>
- </div>
-
- <div class="row">
- <div class="col-sm-4 col-md-4 col-sm-push-8">
- <a class="btn btn-uoe btn-sm pull-right"
- href="http://www.myed.ed.ac.uk/"> MyEd login <span
- class="glyphicon glyphicon-chevron-right"></span></a>
- </div>
- <div class="col-sm-8 col-md-8 col-sm-pull-4">
- <p>
- The University of Edinburgh is a charitable body,
- registered in Scotland, with registration number SC005336,
- VAT Registration Number GB&nbsp;592&nbsp;9507&nbsp;00, and is
- acknowledged by the UK authorities as a
- &ldquo;<a href="https://www.gov.uk/guidance/recognised-uk-degrees">Recognised body</a>&rdquo;
- which has been granted degree awarding powers.
- </p>
- </div>
- </div>
- </div>
- </div>
-
- <div class="container footer-copyright">
- <div class="row">
- <div class="col-md-12 copyright">
- <p>Unless explicitly stated otherwise, all material is
- copyright &copy; The University of Edinburgh.</p>
- </div>
- </div>
- </div>
-
- </footer>
-
<script src="js/ui-scripts.js" type="text/javascript"></script>
<script src="js/angular-scripts.js" type="text/javascript"></script>
<script src="js/angular-addons.js" type="text/javascript"></script>
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index e1280e4..619e868 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -92,8 +92,8 @@ proxy.auth.routes.resource=oauth2
spring.oauth2.client.accessTokenUri=https://dev.oauth.ws-apps.is.ed.ac.uk:443/oauth/token
#spring.oauth2.client.userAuthorizationUri=https://dev.oauth.ws-apps.is.ed.ac.uk:443/oauth/authorize
spring.oauth2.client.clientId=notification-ui
-spring.oauth2.client.clientSecret=s1llycrash3s
-#spring.oauth2.resource.userInfoUri=https://dev.oauth.ws-apps.is.ed.ac.uk/user
+spring.oauth2.client.clientSecret=
+spring.oauth2.resource.userInfoUri=https://dev.oauth.ws-apps.is.ed.ac.uk/user
spring.oauth2.resource.tokenInfoUri=https://dev.oauth.ws-apps.is.ed.ac.uk:443/oauth/check_token
spring.oauth2.resource.preferTokenInfo= true
@@ -122,9 +122,9 @@ outboundSmsJobDetail.frequency=120000
## Notification Hub. You may also need to uncomment and adjust some or all of the other properties
## in this section. (The default value for each property is shown below.)
#
-#cas.protocol=http
-#cas.server=localhost:8080
-#cas.context=/cas
+cas.protocol=http
+cas.server=localhost:8080
+cas.context=/cas
## Outbound Email Settings
##
diff --git a/src/main/resources/quartz.properties b/src/main/resources/quartz.properties
index 85d72f1..120acd5 100644
--- a/src/main/resources/quartz.properties
+++ b/src/main/resources/quartz.properties
@@ -3,10 +3,10 @@ org.quartz.scheduler.instanceId=AUTO
org.quartz.threadPool.threadCount=5
#org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
-org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.MSSQLDelegate
+#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.MSSQLDelegate
org.quartz.jobStore.useProperties=true
org.quartz.jobStore.misfireThreshold=60000
org.quartz.jobStore.tablePrefix=QRTZ_
org.quartz.jobStore.isClustered=true
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index 0f82dad..5ffc5a3 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -5,11 +5,11 @@
<!--
| Use basic Bootstrap
+-->
- <!-- link href="/webjars/bootstrap/3.3.6/dist/css/bootstrap.min.css" rel="stylesheet" /-->
+ <link href="/webjars/bootstrap/3.3.6/dist/css/bootstrap.min.css" rel="stylesheet" />
<!--
| Use EdGel
+-->
- <link href="/webjars/edgel-webjar/2.0.1/gel/css/edgel-green-dark.min.css" rel="stylesheet" />
+ <!-- link href="/webjars/edgel-webjar/2.0.1/gel/css/edgel-green-dark.min.css" rel="stylesheet" /-->
<link href="css/angular-addons.css" rel="stylesheet" />
<link href="css/ui-addons.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment