nre-learning / antidote-selfmedicate

Configs and scripts for spinning up a local instance of Antidote on your laptop for testing and lesson development
Apache License 2.0
12 stars 19 forks source link

Installing on Mac - sed: 1: "/etc/hosts": extra characters at the end of h command #20

Closed psychemedia closed 5 years ago

psychemedia commented 5 years ago

Running the initial set-up on a Mac, I get the following error:

sed: 1: "/etc/hosts": extra characters at the end of h command

as the attempt is made under sudo to change /etc/hosts.

Ref: https://github.com/nre-learning/antidote-selfmedicate/blob/be63fd5948374b64dde49b1b485d7c0b89bca9a2/selfmedicate.sh#L54

Arghhh....

And here:

https://github.com/nre-learning/antidote-selfmedicate/blob/be63fd5948374b64dde49b1b485d7c0b89bca9a2/selfmedicate.sh#L170

There is a related patch in another repo here: https://github.com/passff/passff/pull/268/commits/f5cd7a30d3e1214c1ffc89bba7e8b87432417a39

When I employ that change, when I do run:

sudo sed -i '' '/antidote-local.*/d' /etc/hosts > /dev/null

it runs without error but when I cat the /etc/hosts file, nothing has changed...

However, I don't see anything on: http://IP.ADDR:30001. The box looks to be running in VirtualBox.

Checking kubectl shows no activity:

kubectl get pods
# No resources found.

Updating kubectl, resetting paths to latest version, destroying minikube instance and creating a new one seems to have helped....

psychemedia commented 5 years ago

Hmmm...

So, the service runs but when I launch a lesson, I don't get a terminal connection?

image

Any suggestion on debug steps I should take?

(Trying to launch a lesson, even a previously launched lesson, also take 10, 15, more mins on my local machine: MacBook Pro, 2.5 GHz Intel Core i7, 16 GB 1600 MHz DDR3); just sits on Configuring endpoints for this lesson....

cloudtoad commented 5 years ago

This is a posix related issue. the "-i" option with sed isn't posix. So how it handles arguments is differentt between GNU and BSD. Will update script to be posix compliant...

rambattu commented 5 years ago

It needs to be updated here as well for ./selfmedicate.sh resume to work properly as well. https://github.com/nre-learning/antidote-selfmedicate/blob/master/selfmedicate.sh#L64