Portainer
How to use Portainer in practice you can see:
- Install docker
- Run hello-word test
- Install docker composer
- Install old potrainer
- Run
- Delete old potrainer and update to 2.0
- But, of course, connection between Portainer and Docker not can be established always.
- In this case connection established, but Portainer now show anything, Images, Containers and so on.
- And, of course, connection between Portainer and Portainer agent not ne established always, I follow this instruction How to use the Agent, but failed to connect to Agent from another host. And even connection to docker in another docker host is impossible. This is my command to start Agent service. And after that I made network public, but still failed to connect to Agent from another host.
- I don't know how to solve issue with agent, but issue for connection between Potrainer and Docker can be solved by recreation service from same begining (and Portainer user can be root). And this is my command to start Portainer-ce
- This is command to restart Portainer to another port with reset password and log to console:
# sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get install docker-ce docker-ce-cli (without containerd.io - 32 bit (old))
# sudo docker run hello-world
# sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# sudo chmod +x /usr/local/bin/docker-compose
# sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# cd ~/
# sudo docker volume create portainer_data
# sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
# sudo docker ps -l
# sudo docker stop a06fa940cfd2
# sudo docker rm a06fa940cfd2
# sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
# sudo docker service create \
> --name portainer_agent \
> --publish mode=host,target=9001,published=9001 \
> --network portainer_agent_network \
> --mode global \
> --constraint 'node.platform.os == linux' \
> --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
> --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes \
> portainer/agent
# sudo docker service create \
--name portainer \
--network portainer_agent_network \
--publish 9000:9000 \
--publish 8000:8000 \
--replicas=1 \
--constraint 'node.role == manager' \
portainer/portainer-ce -H "tcp://tasks.portainer_agent:9001" --tlsskipverify
# sudo docker run -p 9002:9000 -p 8002:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --admin-password=''
Unfortunately, Portainer show something errors and can not connected even to docker in the same machine. Even after Ubuntu reboot. Even without swarm.
It was a good program, but I don't know reason of this issue and must be leave using this program. I have no more time to restore access from Potrainer to docker in the same machine.
sudo docker logs -f d708f87aefe3 2020/12/11 19:17:40 server: Reverse tunnelling enabled 2020/12/11 19:17:40 server: Fingerprint ae:fc:17:85:15:e8:68:95:7f:f1:8c:ea:59:49:7c:3c 2020/12/11 19:17:40 server: Listening on 0.0.0.0:8000... 2020/12/11 19:17:40 Starting Portainer 2.0.0 on :9000 2020/12/11 19:17:40 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process] 2020/12/11 19:17:49 http error: Invalid JWT token (err=Invalid JWT token) (code=401) 2020/12/11 19:17:49 http error: Unauthorized (err=Unauthorized) (code=401) 2020/12/11 19:17:50 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404) 2020/12/11 19:17:50 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404) 2020/12/11 19:17:50 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
Comments (
)
Link to this page:
//www.vb-net.com/Portainer/Index.htm
|