Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

How to access swarmpit? #9

Closed
sardaukar opened this issue May 1, 2020 · 12 comments
Closed

How to access swarmpit? #9

sardaukar opened this issue May 1, 2020 · 12 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sardaukar
Copy link
Contributor

I installed swarmlet on a domain, but can't seem to get anything but 404s. Should swarmpit be accessible from swarmpit.domain.tld?

@sardaukar
Copy link
Contributor Author

Also, swarmlet info tells me unknown command. Is that a known issue?

@woudsma
Copy link
Member

woudsma commented May 1, 2020

Yeah, at this stage there are some things not implemented, such as swarmlet info.
Sorry 😅 I have to update the docs.

To access a web service you first need to configure the domain name. You need to clone the swarmpit repo from the swarm, change the URL in the .env file, and push again to redeploy and configure services included by Swarmlet (Matamo and Swarmpit atm).

@woudsma
Copy link
Member

woudsma commented May 1, 2020

*Try to pull the Swarmpit repo from the swarm using git clone git@swarm:swarmpit, edit, commit and git push origin master.

Traefik usually takes some time to generate the SSL certs, a minute or two.

@sardaukar
Copy link
Contributor Author

I think the hostname setting probably has an issue. I see

remote: =====> Stack deployed:
remote: [swarmpit] — https://swarmpit./home/git/swarmpit

the $HOSTNAME is set to the proper value, though.

@woudsma
Copy link
Member

woudsma commented May 1, 2020

@sardaukar Exactly, and I'm not sure why $HOSTNAME is not displayed. Probably because the deployments service runs the build in a Docker container and doesn't have a hostname. In any case you should define the domain name in the .env file of any web service - at the moment.

This workflow should also be improved and explained in the docs. If you feel like helping out, please do! 👍

@sardaukar
Copy link
Contributor Author

I'll have a look at this tomorrow! Thanks

@woudsma
Copy link
Member

woudsma commented May 1, 2020

I'm curious if you've managed to host Swarmpit on your domain yet using Swarmlet.
Let me know when you do! 😃

Later today I'm going to update the docs on how to configure Swarmpit, Matomo and optionally Swarmprom/Portainer.

@sardaukar
Copy link
Contributor Author

Yeah, I'm curious about that too. It'd be great to just work out of the box.

@woudsma
Copy link
Member

woudsma commented May 1, 2020

100% agree.
Have you tried these steps?

# on your local machine

git clone git@swarm:swarmpit
cd swarmpit
nano .env  # edit DOMAIN=swarmlet.dev to your domain
git add . && git commit -m 'update'
git push origin master

If the service is not accessible online after a few minutes, you could try following the logs of both Swarmpit and Traefik if you can find any clues.

# on the server

docker service logs swarmpit_app -f
docker service logs loadbalancer_traefik -f

@woudsma woudsma added bug Something isn't working good first issue Good for newcomers labels May 2, 2020
@woudsma
Copy link
Member

woudsma commented May 6, 2020

I've just updated the master branch with some fixes, setting a root domain during installation should fix this issue. You can try it using:

curl -fsSL https://get.swarmlet.dev | bash -s ROOT_DOMAIN=dev.mydomain.com

(assuming *.dev.mydomain.com is pointed to the server you're installing Swarmlet on).

This should make these domains accessible after installation:

https://swarmpit.dev.mydomain.com
https://matomo.dev.mydomain.com
https://traefik.dev.mydomain.com
https://consul.dev.mydomain.com

Please let me know if you get the chance to try it out!

@woudsma
Copy link
Member

woudsma commented May 19, 2020

Closing this for now, please re-open if you are still running into this issue after a fresh installation.

@woudsma woudsma closed this as completed May 19, 2020
@sardaukar
Copy link
Contributor Author

Hey sorry have been busy lately, will check this out soon!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants