Skip to content

Commit 99143a9

Browse files
authored
Merge pull request #413 from Paraphraser/20210924-portainer-experimental
20210924 Portainer - experimental branch - PR 3 of 3
2 parents 111963d + ff304bd commit 99143a9

File tree

5 files changed

+15
-341
lines changed

5 files changed

+15
-341
lines changed

.internal/templates/services/portainer/build.js

Lines changed: 0 additions & 147 deletions
This file was deleted.

.internal/templates/services/portainer/config.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

.internal/templates/services/portainer/template.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/Containers/Portainer-ce.md

Lines changed: 15 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
# Portainer CE
22

3-
## References
3+
## <a name="references"> References </a>
44

55
- [Docker](https://hub.docker.com/r/portainer/portainer-ce/)
66
- [Website](https://www.portainer.io/portainer-ce/)
77

8-
## Definition
8+
## <a name="definitions"> Definition </a>
99

1010
- "#yourip" means any of the following:
1111

1212
- the IP address of your Raspberry Pi (eg `192.168.1.10`)
1313
- the multicast domain name of your Raspberry Pi (eg `iot-hub.local`)
1414
- the domain name of your Raspberry Pi (eg `iot-hub.mydomain.com`)
1515

16-
## About *Portainer CE*
16+
## <a name="about"> About *Portainer CE* </a>
1717

1818
*Portainer CE* (Community Edition) is an application for managing Docker. It is a successor to *Portainer*. According to [the *Portainer CE* documentation](https://www.portainer.io/2020/08/portainer-ce-2-0-what-to-expect/)
1919

2020
> Portainer 1.24.x will continue as a separate code branch, released as portainer/portainer:latest, and will receive ongoing security updates until at least 1st Sept 2021. No new features will be added beyond what was available in 1.24.1.
2121
2222
From that it should be clear that *Portainer* is deprecated and that *Portainer CE* is the way forward.
2323

24-
## *Portainer CE* coexistence with *Portainer*
25-
26-
IOTstack has been set up so that *Portainer CE* and *Portainer* can coexist. This is intended as a short-term migration aid rather than a long-term proposition.
27-
28-
If you are a first-time user of IOTstack, you should choose *Portainer CE* and forget about *Portainer*.
29-
30-
## Installing *Portainer CE*
24+
## <a name="installation"> Installing *Portainer CE* </a>
3125

3226
Run the menu:
3327

@@ -46,102 +40,18 @@ Ignore any message like this:
4640

4741
> WARNING: Found orphan containers (portainer) for this project …
4842
49-
### <a name="MigrationNote"> Migration note </a>
50-
51-
*Portainer CE* and *Portainer* use different locations for their persistent data:
52-
53-
Edition | Persistent Data Directory | Reference
54-
-------------|---------------------------------|:---------:
55-
Portainer | ~/IOTstack/volumes/portainer | [A]
56-
Portainer CE | ~/IOTstack/volumes/portainer-ce | [B]
57-
58-
If you have been running *Portainer* but have **never** run *Portainer CE* then:
59-
60-
* [A] will exist, but
61-
* [B] will not exist.
62-
63-
Whenever "Portainer-ce" is enabled in `menu.sh`, a check is made for the **presence** of [A] combined with the **absence** [B]. If and only if that situation exists, [B] is initialised as a copy of [A].
64-
65-
This one-time copy is intended to preserve your *Portainer* settings and admin user password for use in *Portainer CE*. Thereafter, any settings you change in *Portainer CE* will not be reflected in *Portainer*, nor vice versa.
43+
## <a name="firstRun"> First run of *Portainer CE* </a>
6644

67-
## Port Number = 9002
45+
In your web browser navigate to `#yourip:9000/`:
6846

69-
Both *Portainer CE* and *Portainer* are usually configured to listen to port 9000 but, in the IOTstack implementation:
47+
- the first screen will suggest a username of "admin" and ask for a password. Supply those credentials and click "Create User".
48+
- the second screen will ask you to select a connection method. For IOTstack, "Docker (Manage the local Docker environment)" is usually appropriate so click that and then click "Connect".
7049

71-
* *Portainer CE* uses port 9002; and
72-
* *Portainer* uses port 9000.
73-
74-
> You can always change the port numbers in your `docker-compose.yml`.
75-
76-
## First run of *Portainer CE*
77-
78-
In your web browser navigate to `#yourip:9002/`.
79-
80-
* If you are migrating from *Portainer*:
81-
82-
- review the [Migration note](#MigrationNote) which explains why your *Portainer* credentials will likely apply to *Portainer CE*, and then
83-
- supply your *Portainer* credentials.
84-
85-
* <a name="NewAccount"> If you are **not** migrating from *Portainer*: </a>
86-
87-
- the first screen will suggest a username of "admin" and ask for a password. Supply those credentials and click "Create User".
88-
- the second screen will ask you to select a connection method. For IOTstack, "Docker (Manage the local Docker environment)" is usually appropriate so click that and then click "Connect".
89-
90-
From there, you can click on the "Local" group and take a look around. One of the things *Portainer CE* can help you do is find unused containers but beware of reading too much into this because, sometimes, an "unused" container is actually the base for another container (eg Node-Red).
50+
From there, you can click on the "Local" group and take a look around. One of the things *Portainer CE* can help you do is find unused containers but beware of reading too much into this because, sometimes, an "unused" container is actually the base for another container (eg Node-RED).
9151

9252
There are 'Quick actions' to view logs and other stats. This can all be done from terminal commands but *Portainer CE* makes it easier.
9353

94-
## Ceasing use of Portainer
95-
96-
As soon as you are happy that *Portainer CE* meets your needs, you can dispense with *Portainer*. IOTstack only has limited support for getting rid of unwanted services so you should do the following.
97-
98-
1. Stop Portainer from running and remove its image:
99-
100-
```
101-
$ cd ~/IOTstack
102-
$ docker-compose stop portainer
103-
$ docker-compose rm -f portainer
104-
$ docker rmi portainer/portainer
105-
```
106-
107-
2. Either:
108-
109-
- run `menu.sh`
110-
- choose "Build Stack"
111-
- de-select "portainer", and
112-
- follow through to the end choosing "Do not overwrite" for existing services,
113-
114-
or:
115-
116-
- edit `docker-compose.yml` and remove these lines:
117-
118-
```
119-
portainer:
120-
container_name: portainer
121-
image: portainer/portainer
122-
restart: unless-stopped
123-
ports:
124-
- "9000:9000"
125-
volumes:
126-
- /var/run/docker.sock:/var/run/docker.sock
127-
- ./volumes/portainer/data:/data
128-
```
129-
130-
- edit `services/selection.txt` and remove this line:
131-
132-
```
133-
portainer
134-
```
135-
136-
3. Tidy-up:
137-
138-
```
139-
$ cd ~/IOTstack
140-
$ rm -rf ./services/portainer
141-
$ sudo rm -rf ./volumes/portainer
142-
```
143-
144-
## Setting the Public IP address for your end-point
54+
## <a name="setPublicIP"> Setting the Public IP address for your end-point </a>
14555

14656
If you click on a "Published Port" in the "Containers" list, your browser may return an error saying something like "can't connect to server" associated with an IP address of "0.0.0.0".
14757

@@ -169,7 +79,7 @@ Keep in mind that clicking on a "Published Port" does not guarantee that your br
16979

17080
> All things considered, you will get more consistent behaviour if you simply bookmark the URLs you want to use for your IOTstack services.
17181
172-
## If you forget your password
82+
## <a name="forgotPassword"> If you forget your password </a>
17383

17484
If you forget the password you created for *Portainer CE*, you can recover by doing the following:
17585

@@ -180,4 +90,7 @@ $ sudo rm -r ./volumes/portainer-ce
18090
$ docker-compose start portainer-ce
18191
```
18292

183-
Then use your browser to navigate to `#yourip:9002/` and follow the steps in [if you are **not** migrating from *Portainer*](#NewAccount).
93+
Then, follow the steps in:
94+
95+
1. [First run of *Portainer CE*](#firstRun); and
96+
2. [Setting the Public IP address for your end-point](#setPublicIP).

0 commit comments

Comments
 (0)