Skip to content

Commit

Permalink
Update repo. files to pass scancode tests/fix Travis (#205)
Browse files Browse the repository at this point in the history
* Update repo. files to pass scancode tests/fix Travis

* Update repo. files to pass scancode tests/fix Travis
  • Loading branch information
mrutkows authored and pritidesai committed Mar 14, 2019
1 parent 2079e03 commit ec09726
Show file tree
Hide file tree
Showing 31 changed files with 357 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

sudo: required

env:
Expand Down
31 changes: 16 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# under the Apache License, Version 2.0 (the # "License"); you may not use this
# file except in compliance with the License. You may obtain a copy of the License
# at:
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

Expand All @@ -35,18 +36,18 @@ Instructions on how to do this can be found here:
[http://www.apache.org/licenses/#clas](http://www.apache.org/licenses/#clas)

Once submitted, you will receive a confirmation email from the Apache Software Foundation (ASF) and be added to
the following list: http://people.apache.org/unlistedclas.html.
the following list: http://people.apache.org/unlistedclas.html.

Project committers will use this list to verify pull requests (PRs) come from contributors that have signed a CLA.

We look forward to your contributions!
We look forward to your contributions!

## Raising issues

Please raise any bug reports on the respective project repository's GitHub issue tracker. Be sure to search the
Please raise any bug reports on the respective project repository's GitHub issue tracker. Be sure to search the
list to see if your issue has already been raised.

A good bug report is one that make it easy for us to understand what you were trying to do and what went wrong.
A good bug report is one that make it easy for us to understand what you were trying to do and what went wrong.
Provide as much context as possible so we can try to recreate the issue.

### Discussion
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

# Developer tools for OpenWhisk

[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
Expand Down
2 changes: 2 additions & 0 deletions docker-compose/.travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/../"
Expand Down
3 changes: 3 additions & 0 deletions docker-compose/.travis/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

set -x -e
uname -sm

Expand Down
31 changes: 25 additions & 6 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

# How to setup OpenWhisk with Docker Compose

[![Build Status](https://travis-ci.org/apache/incubator-openwhisk-devtools.svg?branch=master)](https://travis-ci.org/apache/incubator-openwhisk-devtools)
Expand Down Expand Up @@ -200,24 +219,24 @@ wsk package list /whisk.system
- Action output such as stdout or console.log(): `wsk -i activation logs <activationId>`

## Debugging OpenWhisk Invoker and Controller
Both invoker and controller can be remotely debugged using any preferred IDE by setting these command line arguments for the remote JVM:
Both invoker and controller can be remotely debugged using any preferred IDE by setting these command line arguments for the remote JVM:

```
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$port
```
These ports are available for debugging on `localhost`:
These ports are available for debugging on `localhost`:
- `9333` for the Invoker
- `9222` for the Controller

Using IntelliJ:

Follow these steps to create a new `Run/Debug Configuration` for the `Invoker`. Same can be done for the `Controller`:
Follow these steps to create a new `Run/Debug Configuration` for the `Invoker`. Same can be done for the `Controller`:
- Go to `Run` -> `Edit Configurations` -> `Add new Configuration` -> `Remote`
- Change port to `9333` and leave the host as `localhost`
- You can now debug the `Invoker` remotely by setting breakpoints inside the code
- You can now debug the `Invoker` remotely by setting breakpoints inside the code

> Please be aware that changes done in the code are not automatically deployed. In order to be able to debug new changes, you need to rebuild the application and redeploy it with `docker-compose`.
> Please be aware that changes done in the code are not automatically deployed. In order to be able to debug new changes, you need to rebuild the application and redeploy it with `docker-compose`.

## Custom Docker containers for actions

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# TO BE INCLUDED FOR EACH VHOST
# Use this file to overwrite any nginx variables based on the environment

# set $my_var my_value;
# set $my_var my_value;
19 changes: 18 additions & 1 deletion docker-compose/apigateway/env.conf/api-gateway-env.http.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# INCLUDED IN HTTP BLOCK
more_set_headers 'Server: openwhisk/api-gateway-1.9.3.1';
more_set_headers 'Server: openwhisk/api-gateway-1.9.3.1';
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
upstream api-gateway-redis {
# redis.docker is defined by docker-compose
server redis.docker:6379;
Expand All @@ -6,4 +22,4 @@ upstream api-gateway-redis {
upstream api-gateway-redis-replica {
# redis.docker is defined by docker-compose
server redis.docker:6379;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# virtual host loaded by the API Gateway for local development with docker-compose

# NOTE: This upstream should come from a service discovery component
Expand Down
19 changes: 18 additions & 1 deletion docker-compose/apigateway/rclone/rclone.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

[minio]
type = s3
provider = Minio
Expand All @@ -8,4 +25,4 @@ region = us-east-1
endpoint = http://minio.docker:9000
location_constraint =
server_side_encryption =
acl = public-read
acl = public-read
4 changes: 3 additions & 1 deletion docker-compose/docker-compose.packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
version: '3'
services:
alarmsprovider:
Expand Down Expand Up @@ -54,7 +56,7 @@ services:
DB_USER: whisk_admin
DB_PASS: some_passw0rd
DB_PREFIX: ${OPEN_WHISK_DB_PREFIX:-local_}
LOCAL_DEV: "True"
LOCAL_DEV: "True"
HOST_MACHINE: ${HOST_MACHINE}
ROUTER_HOST: apigateway.docker
ENDPOINT_AUTH: ${ENDPOINT_AUTH}
Expand Down
2 changes: 2 additions & 0 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
version: '3'
services:
db:
Expand Down
2 changes: 2 additions & 0 deletions java-action-archetype/.travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

SCRIPTDIR=$(cd $(dirname "$0") && pwd)
TOOLDIR="$SCRIPTDIR/../"
Expand Down
3 changes: 3 additions & 0 deletions java-action-archetype/.travis/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

set -x -e
uname -sm

Expand Down
25 changes: 22 additions & 3 deletions java-action-archetype/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

# Maven Archetype for Java Action

This archetype helps to generate the Java Action template project.
Expand All @@ -9,14 +28,14 @@ The following softwares are required to build and deploy a Java Action to OpenWh
* (Maven v3.3.x)[https://maven.apache.org] or above
* Java 8 or above

[WSK CLI](https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md) is configured
[WSK CLI](https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md) is configured

## Install the archetype
```sh
mvn -DskipTests=true -Dmaven.javadoc.skip=true -B -V clean install
```

## Generate project
## Generate project

```sh
mvn archetype:generate \
Expand All @@ -41,4 +60,4 @@ After successful deployment of the function, we can invoke the same via `wsk act

```json
{"greetings": "Hello! Welcome to OpenWhisk" }
```
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
groupId=com.example
artifactId=java-demo-fn
version=0.1-SNAPSHOT
artifactId=basic
artifactId=basic
Loading

0 comments on commit ec09726

Please sign in to comment.