Update references remove refs to treeder oracle funcy (#376)

* Remove lots of refs to iron and funcy oracle etc..

* more ref replacements

* Replacing more refs. Treeder

* Use Fn not FN
This commit is contained in:
James Jeffrey
2017-09-29 16:22:15 -07:00
committed by Travis Reeder
parent 5219227393
commit c7f3066c75
81 changed files with 211 additions and 398 deletions

View File

@@ -1,4 +1,4 @@
Oracle Functions integration API tests
FN integration API tests
======================================
@@ -7,7 +7,7 @@ Test dependencies
```bash
DOCKER_HOST - for building images
API_URL - Oracle Functions API endpoint
API_URL - Fn API endpoint
```
How to run tests?

View File

@@ -1,8 +1,8 @@
FROM funcy/go:dev as build-stage
FROM fnproject/go:dev as build-stage
WORKDIR /function
ADD . /src
RUN cd /src && go build -o func
FROM funcy/go
FROM fnproject/go
WORKDIR /function
COPY --from=build-stage /src/func /function/
ENTRYPOINT ["./func"]

View File

@@ -1,8 +1,8 @@
FROM funcy/go:dev as build-stage
FROM fnproject/go:dev as build-stage
WORKDIR /function
ADD . /src
RUN cd /src && go build -o func
FROM funcy/go
FROM fnproject/go
WORKDIR /function
COPY --from=build-stage /src/func /function/
ENTRYPOINT ["./func"]

View File

@@ -1,4 +1,4 @@
name: funcy/multi-log
name: fnproject/multi-log
version: 0.0.1
runtime: go
entrypoint: ./func

View File

@@ -1,8 +1,8 @@
FROM funcy/go:dev as build-stage
FROM fnproject/go:dev as build-stage
WORKDIR /function
ADD . /src
RUN cd /src && go build -o func
FROM funcy/go
FROM fnproject/go
WORKDIR /function
COPY --from=build-stage /src/func /function/
ENTRYPOINT ["./func"]

View File

@@ -1,7 +1,7 @@
# fnlb-test-harness
Test harness that exercises the fnlb load balancer in order to verify that it works properly.
## How it works
This is a test harness that makes calls to an Oracle Functions route through the fnlb load balancer, which routes traffic to multiple Oracle Functions nodes.
This is a test harness that makes calls to an Fn route through the fnlb load balancer, which routes traffic to multiple Fn nodes.
The test harness keeps track of which node each request was routed to so we can assess how the requests are being distributed across the nodes. The functionality
of fnlb is to normally route traffic to the same small number of nodes so that efficiences can be achieved and to support reuse of hot functions.
### Primes function
@@ -14,25 +14,25 @@ where:
- *loops*: number of times to calculate the primes (repeating the count consumes additional CPU without consuming additional memory)
## How to use it
The test harness requires running one or more Oracle Functions nodes and one instance of fnlb. The list of nodes must be provided both to fnlb and to the test harness
The test harness requires running one or more Fn nodes and one instance of fnlb. The list of nodes must be provided both to fnlb and to the test harness
because the test harness must call each node directly one time in order to discover the node's container id.
After it has run, examine the results to see how the requests were distributed across the nodes.
### How to run it locally
Each of the Oracle Functions nodes needs to connect to the same database.
Each of the Fn nodes needs to connect to the same database.
STEP 1: Create a route for the primes function. Example:
```
fn apps create primesapp
fn routes create primesapp /primes jconning/primes:0.0.1
```
STEP 2: Run five Oracle Functions nodes locally. Example (runs five nodes in the background using Docker):
STEP 2: Run five Fn nodes locally. Example (runs five nodes in the background using Docker):
```
sudo docker run -d -it --name functions-8082 --privileged -v ${HOME}/data-8082:/app/data -p 8082:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" treeder/functions
sudo docker run -d -it --name functions-8083 --privileged -v ${HOME}/data-8083:/app/data -p 8083:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" treeder/functions
sudo docker run -d -it --name functions-8084 --privileged -v ${HOME}/data-8084:/app/data -p 8084:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" treeder/functions
sudo docker run -d -it --name functions-8085 --privileged -v ${HOME}/data-8085:/app/data -p 8085:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" treeder/functions
sudo docker run -d -it --name functions-8086 --privileged -v ${HOME}/data-8086:/app/data -p 8086:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" treeder/functions
sudo docker run -d -it --name functions-8082 --privileged -v ${HOME}/data-8082:/app/data -p 8082:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" fnproject/functions
sudo docker run -d -it --name functions-8083 --privileged -v ${HOME}/data-8083:/app/data -p 8083:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" fnproject/functions
sudo docker run -d -it --name functions-8084 --privileged -v ${HOME}/data-8084:/app/data -p 8084:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" fnproject/functions
sudo docker run -d -it --name functions-8085 --privileged -v ${HOME}/data-8085:/app/data -p 8085:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" fnproject/functions
sudo docker run -d -it --name functions-8086 --privileged -v ${HOME}/data-8086:/app/data -p 8086:8080 -e "DB_URL=postgres://dbUser:dbPassword@dbHost:5432/dbName" fnproject/functions
```
STEP 3: Run fnlb locally. Example (runs fnlb on the default port 8081):
```

View File

@@ -107,7 +107,7 @@ func invokeLoadBalancer(hostPort, path string, numExecutions, max, loops int) {
func discoverContainerIds() {
// Discover the Docker hostname of each node; create a mapping of hostnames to host/port.
// This is needed because Oracle Functions doesn't make the host/port available to the function (as of Mar 2017).
// This is needed because FN doesn't make the host/port available to the function (as of Mar 2017).
fmt.Println("Discovering container ids for every node (use Docker's HOSTNAME env var as a container id)...")
for _, s := range nodes {
if e, err := executeFunction(s, route, 100, 1); err == nil {