Skip to content

Commit 23117b2

Browse files
committed
prepare a quick-start tutorial
1 parent 1bad954 commit 23117b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1024
-1090
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ test.toml
88
.idea/
99
.mypy_cache/
1010
*.bin
11-
/animation/
1211

1312
~$*
1413

Makefile

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,21 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
#
1717

18-
.PHONY: build client server container binary runclient runserver installserver cleanupserver
18+
.PHONY: build container celestial-make rootfs-builder
1919

20-
build: proto container binary
21-
client: proto container runclient
22-
server: proto binary runserver
20+
build: proto celestial.bin
2321

2422
container: proto Dockerfile celestial.py celestial ## build client docker container
2523
docker build -t celestial .
2624

27-
binary: celestial.bin
28-
2925
celestial.bin: celestial.go pkg proto ## build go binary
3026
go build -o celestial.bin .
3127

32-
proto: ## build proto files
28+
proto/: ## build proto files
3329
cd ./proto ; make ; cd ..
3430

35-
runclient: container ## run client
36-
docker run --rm -it -v $(pwd)/config.toml:/config.toml celestial /config.toml
37-
38-
runserver: celestial.bin ## run server
39-
sudo ./celestial.bin
40-
41-
cleanupserver: ## run server cleanup
42-
bash ./cleanupserver.sh
31+
celestial-make: ## build the compile container
32+
docker build -f compile.Dockerfile -t celestial-make .
4333

44-
installserver: ## install dependencies on server
45-
bash ./installserver.sh
34+
rootfsbuilder: ## build the rootfs builder container
35+
cd ./builder ; make rootfsbuilder ; cd ..

animation/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Animation Only
2+
3+
If you would like to animate a satellite constellation, use the `animate.py`
4+
program in the root of the repository like so:
5+
6+
```sh
7+
python3 animate.py ./path/to/configuration.toml
8+
```
9+
10+
![Constellation Animation](../docs/assets/celestial-constellation.gif)
11+
12+
In the [`animation`](./animation) directory, you can find two example
13+
configuration files.
14+
15+
`starlink.toml` has all parameters for the complete Starlink phase I
16+
constellation, so use that to animate that constellation:
17+
18+
```sh
19+
# in /celestial root directory
20+
python3 animate.py ./animation/starlink.toml
21+
```
22+
23+
`geostationary.toml` has a single geo-stationary satellite in orbit
24+
around earth.
File renamed without changes.
File renamed without changes.
File renamed without changes.

celestial.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,20 @@ func main() {
7878
panic(err.Error())
7979
}
8080
}()
81+
8182
go func() {
8283
err := infoserver.Start(*infoServerPort, o)
8384
if err != nil {
8485
panic(err.Error())
8586
}
8687
}()
88+
8789
go func() {
8890
err := s.Serve(lisS)
8991
if err != nil {
9092
panic(err.Error())
9193
}
9294
}()
95+
9396
panic(p.Serve(lisP))
9497
}

celestial/animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def __init__(
103103
self.shell_actors.append(types.SimpleNamespace())
104104
self.isl_actors.append(types.SimpleNamespace())
105105

106-
self.sat_colors = sns.color_palette(n_colors=self.num_shells+3)[3:]
107-
self.isl_colors = sns.color_palette(n_colors=self.num_shells+3, desat=0.5)[3:]
106+
self.sat_colors = sns.color_palette(n_colors=self.num_shells)
107+
self.isl_colors = sns.color_palette(n_colors=self.num_shells, desat=0.5)
108108

109109
self.draw_links = draw_links
110110

compile.Dockerfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM debian:bullseye@sha256:bdf44f19d09b558203306836a612cc8e42a1106b2f731fbeb000e2696c04f9c8
2+
3+
RUN apt-get update && apt-get install -y \
4+
--no-install-recommends \
5+
--no-install-suggests \
6+
ca-certificates \
7+
wget \
8+
make \
9+
unzip \
10+
python3 \
11+
git \
12+
python3-pip && \
13+
apt-get clean && rm -rf /var/lib/apt/lists/*
14+
15+
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip && \
16+
unzip protoc-3.15.8-linux-x86_64.zip -d protoc-3.15.8 && \
17+
mv protoc-3.15.8 /usr/local/protoc && \
18+
rm protoc-3.15.8-linux-x86_64.zip && \
19+
chmod +x /usr/local/protoc/bin/* && \
20+
ln -s /usr/local/protoc/bin/protoc /usr/local/bin/protoc
21+
22+
RUN wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz && \
23+
rm -rf /usr/local/go && \
24+
tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz && \
25+
echo 'export PATH="$PATH:/usr/local/go/bin"' >> /etc/profile && \
26+
echo 'export PATH="$PATH:/root/go/bin"' >> /etc/profile && \
27+
echo 'export GOPATH=/root/go' >> /etc/profile && \
28+
echo 'export GOBIN="/root/go/bin"' >> /etc/profile && \
29+
rm -rf go1.18.1.linux-amd64.tar.gz
30+
31+
ENV PATH $PATH:/usr/local/go/bin
32+
ENV PATH $PATH:/root/go/bin
33+
ENV GOPATH /root/go
34+
ENV GOBIN /root/go/bin
35+
36+
RUN go install google.golang.org/protobuf/cmd/[email protected] && \
37+
go install google.golang.org/grpc/cmd/[email protected]
38+
39+
COPY requirements.txt requirements.txt
40+
RUN python3 -m pip install -r requirements.txt -U
41+
42+
WORKDIR /celestial
43+
44+
ENTRYPOINT [ "make" ]

docs/assets/actual_line.png

125 KB
Loading

0 commit comments

Comments
 (0)