Skip to content

Commit

Permalink
Merge pull request uPortal-Attic#206 from UW-Madison-DoIT/codenvy-up-…
Browse files Browse the repository at this point in the history
…n-running

Get Codenvy Project Setup for angularjs-portal
  • Loading branch information
Tim Levett committed Apr 27, 2015
2 parents edb7c5d + 1966dac commit f63c832
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 2 deletions.
1 change: 1 addition & 0 deletions .codenvy/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mixinTypes":[],"builders":{"configs":{},"default":"maven"},"runners":{"configs":{"project://Multinode-tc7-j7":{"ram":500,"variables":{"configurationType":"java"},"options":{}}},"default":"project://Multinode-tc7-j7"},"type":"maven","attributes":{"languageVersion":["1.6"],"language":["java"]},"description":"AngularJS alternative UI for MyUW portal (built for uPortal)."}
60 changes: 60 additions & 0 deletions .codenvy/runners/environments/ENV1-angularjs-portal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Base image. You can pull from Docker Hub. Codenvy
# provides a series of tested base images that include
# Web Shell, installed utilities, and language support.
# You can browse our images in Docker Hub or at
# github.com/codenvy/dockerfiles. The shellinabox image
# provides core Linux utilities and terminal access to runner.
FROM codenvy/shellinabox

# Codenvy uses this port to map IDE clients to the output of
# your application executing within the Runner. Set these
# values to the port of your application and Codenvy will
# map this port to the output within the browser, CLI, and API.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8080_HTTP 8080
#
# ENV CODENVY_APP_PORT_<port>_HTTP <port>

# Codenvy uses this port to map IDE clients to the debugger
# of your application within the Runner. Set these
# values to the port of your debugger and Codenvy will
# map this port to the debugger console in the browser.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8000_DEBUG 8000
#
# ENV CODENVY_APP_PORT_<port>_DEBUG <port>

# Set this value to the port of any terminals operating
# within your runner. If you inherit a base image from
# codenvy/shellinabox (or any of our images that inherit
# from it, you do not need to set this value. We already
# set it for you.
# ENV CODENVY_WEB_SHELL_PORT <port>

# Execute your custom commands here. You can add
# as many RUN commands as you want. Combining
# RUN commands into a single entry will cause your
# environment to load faster. Also, building your image
# with docker offline and uploading it to Docker Hub
# as a pre-built base image will also cause it to load
# Faster. This example installs python, curl, and the
# Google SDK as an example.
# RUN sudo apt-get update -y && \\
# sudo apt-get install --no-install-recommends -y -q curl build-essential python3 python3-dev python-pip git python3-pip && \\
# sudo pip3 install -U pip && \\
# sudo pip3 install virtualenv && \\
# sudo mkdir /opt/googlesdk && \\
# wget -qO- \"https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz\" | sudo tar -zx -C /opt/googlesdk && \\
# sudo /bin/sh -c \"/opt/googlesdk/google-cloud-sdk/install.sh\" && \\
# sudo chmod +x /opt/googlesdk/google-cloud-sdk/bin/gcloud

# Include this as the CMD instruction in your Dockerfile if
# you'd like the runner to stay alive after your commands
# have finished executing. Keeping the runner alive is
# necessary if you'd like to terminal into the image. If
# your Dockerfile launches a server or daemon, like Tomcat,
# you do not need to set this value as Docker will not
# terminate until that process has finished.
CMD sleep 365d
8 changes: 8 additions & 0 deletions .codenvy/runners/environments/Multinode-tc7-j7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM codenvy/jdk7_tomcat7

$debug?EXPOSE 8000:$
$debug?ENV CODENVY_APP_PORT_8000_DEBUG 8000:$
$debug?CMD ./catalina.sh jpda run 2>&1:$

ENV CODENVY_APP_BIND_DIR /home/user/tomcat7/webapps
VOLUME ["/home/user/tomcat7/webapps"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[![Build Status](https://travis-ci.org/UW-Madison-DoIT/angularjs-portal.svg)](https://travis-ci.org/UW-Madison-DoIT/angularjs-portal)

[![alt](https://codenvy.com/factory/resources/factory-white.png)](https://codenvy.com/factory?id=tgb1ssv37wjnblun)

### What is this?
This is an angular approach to the dashboard view of uPortal. This dashboard will work along side uPortal, more of a companion app. It utilizes the uPortal rest APIs to collect layout info. It pulls notifications from the notification portlet resource URL.

Expand Down Expand Up @@ -47,4 +49,8 @@ Read more about that here: http://tomcat.apache.org/maven-plugin-2.0/tomcat7-mav

With this you can run `mvn tomcat7:deploy` or `mvn tomcat7:redeploy` if you have already deployed it once.

### Codenvy Setup

+ Create a codenvy account (codenvy.com)
+ Click [![alt](https://codenvy.com/factory/resources/factory-white.png)](https://codenvy.com/factory?id=tgb1ssv37wjnblun) and clone the codenvy project.
+ Run The `Multinode-tc7-j7` runner. (upper right corner). This should be the default runner for the project. (Note that it defaults to the root node, so you have to add in /web or /frame to the URL to get to those sub projects)
1 change: 1 addition & 0 deletions angularjs-portal-frame/.codenvy/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mixinTypes":[],"builders":{"configs":{},"default":"maven"},"runners":{"configs":{}},"description":"Maven","type":"maven","attributes":{"languageVersion":["1.6"],"language":["java"]}}
1 change: 1 addition & 0 deletions angularjs-portal-home/.codenvy/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mixinTypes":[],"builders":{"configs":{},"default":"maven"},"runners":{"configs":{}},"description":"Maven","type":"maven","attributes":{"languageVersion":["1.6"],"language":["java"]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Base image. You can pull from Docker Hub. Codenvy
# provides a series of tested base images that include
# Web Shell, installed utilities, and language support.
# You can browse our images in Docker Hub or at
# github.com/codenvy/dockerfiles. The shellinabox image
# provides core Linux utilities and terminal access to runner.
FROM codenvy/shellinabox

# Codenvy uses this port to map IDE clients to the output of
# your application executing within the Runner. Set these
# values to the port of your application and Codenvy will
# map this port to the output within the browser, CLI, and API.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8080_HTTP 8080
#
# ENV CODENVY_APP_PORT_<port>_HTTP <port>

# Codenvy uses this port to map IDE clients to the debugger
# of your application within the Runner. Set these
# values to the port of your debugger and Codenvy will
# map this port to the debugger console in the browser.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8000_DEBUG 8000
#
# ENV CODENVY_APP_PORT_<port>_DEBUG <port>

# Set this value to the port of any terminals operating
# within your runner. If you inherit a base image from
# codenvy/shellinabox (or any of our images that inherit
# from it, you do not need to set this value. We already
# set it for you.
# ENV CODENVY_WEB_SHELL_PORT <port>

# Execute your custom commands here. You can add
# as many RUN commands as you want. Combining
# RUN commands into a single entry will cause your
# environment to load faster. Also, building your image
# with docker offline and uploading it to Docker Hub
# as a pre-built base image will also cause it to load
# Faster. This example installs python, curl, and the
# Google SDK as an example.
# RUN sudo apt-get update -y && \
# sudo apt-get install --no-install-recommends -y -q curl build-essential python3 python3-dev python-pip git python3-pip && \
# sudo pip3 install -U pip && \
# sudo pip3 install virtualenv && \
# sudo mkdir /opt/googlesdk && \
# wget -qO- "https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz" | sudo tar -zx -C /opt/googlesdk && \
# sudo /bin/sh -c "/opt/googlesdk/google-cloud-sdk/install.sh" && \
# sudo chmod +x /opt/googlesdk/google-cloud-sdk/bin/gcloud


# Include this as the CMD instruction in your Dockerfile if
# you'd like the runner to stay alive after your commands
# have finished executing. Keeping the runner alive is
# necessary if you'd like to terminal into the image. If
# your Dockerfile launches a server or daemon, like Tomcat,
# you do not need to set this value as Docker will not
# terminate until that process has finished.
CMD sleep 365d
2 changes: 1 addition & 1 deletion angularjs-portal-mock-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<description>Mock Portal Environment</description>

<build>
<finalName>mock-portal</finalName>
<finalName>portal</finalName>
</build>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<contextPath>/web</contextPath>
</contextHandler>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
<war>${project.basedir}/angularjs-portal-mock-portal/target/mock-portal.war</war>
<war>${project.basedir}/angularjs-portal-mock-portal/target/portal.war</war>
<contextPath>/portal</contextPath>
</contextHandler>
</contextHandlers>
Expand Down

0 comments on commit f63c832

Please sign in to comment.