Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlowSaga tutorial not working on latest CLI #132

Open
eldermoraes opened this issue Oct 26, 2018 · 3 comments
Open

FlowSaga tutorial not working on latest CLI #132

eldermoraes opened this issue Oct 26, 2018 · 3 comments
Assignees

Comments

@eldermoraes
Copy link

Hi folks,

The FlowSaga tutorial isn't compatible to the latest version of Fn CLI. When you run:

./scripts/configure.sh

It's raises the error:

Fn: 'route' is not a Fn Command

I've tried to fix the script configure.sh like this:

#! /usr/bin/env bash

FLOWSERVER_IP=$(docker inspect --type container -f '{{.NetworkSettings.IPAddress}}' flowserver)
TOOLS_IP=$(docker inspect --type container -f '{{.NetworkSettings.IPAddress}}' bristol)

fn config app travel COMPLETER_BASE_URL "http://$FLOWSERVER_IP:8081"
fn config function travel flight-book FLIGHT_API_URL "http://$TOOLS_IP:3001/flight"
fn config function travel flight-book FLIGHT_API_SECRET "shhhh"
fn config function travel flight-cancel FLIGHT_API_URL "http://$TOOLS_IP:3001/flight"
fn config function travel flight-cancel FLIGHT_API_SECRET "shhhh"
fn config function travel hotel-book HOTEL_API_URL "http://$TOOLS_IP:3001/hotel"
fn config function travel hotel-cancel HOTEL_API_URL "http://$TOOLS_IP:3001/hotel"
fn config function travel car-book CAR_API_URL "http://$TOOLS_IP:3001/car"
fn config function travel car-cancel CAR_API_URL "http://$TOOLS_IP:3001/car"
fn config function travel email EMAIL_API_URL "http://$TOOLS_IP:3001/email"

I'm not sure if it's correct...

Then I used fn migrate on trip function to fix the func.yaml file. Next, the tutorial says to run:

fn call travel /trip < sample-payload.json

But the new CLI doesn't support it, so I've changed to:

fn invoke travel trip < sample-payload.json

And here I got stuck with this error:

{"message":"container exit code 1"}

Fn: Error calling function: status 502

See 'fn <command> --help' for more information. Client version: 0.5.20

Any clue of what could be happening?

@denismakogon
Copy link
Member

Hi! This tutorial is slightly outdated. Please https://github.com/delabassee/tutorials/tree/master/FlowSaga for now, we’re working to update all tutorials we have.

@eldermoraes
Copy link
Author

Great! Thanks.

@zootalures
Copy link
Member

Am going to re-open this as we don't have a bug to track it
@michael-w-williams can you see if you can retrofit @delabassee 's example into tutorials? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants