transparency-dev / trillian-tessera

Go library for building tile-based transparency logs (tlogs)
Apache License 2.0
11 stars 11 forks source link

Add docker compose files in example-mysql #99

Closed roger2hk closed 3 months ago

roger2hk commented 3 months ago

21

The test private and public keys come from the Al's betty repo.

➜  trillian-tessera git:(mysql-docker-compose) ✗ docker compose -f ./cmd/example-mysql/docker/compose.yaml up  
[+] Building 36.8s (14/14) FINISHED                                                                                                                                                      docker:default
 => [tessera-example-mysql internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 694B                                                                                                                                                               0.0s
 => [tessera-example-mysql internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 2B                                                                                                                                                                    0.0s
 => [tessera-example-mysql internal] load metadata for docker.io/library/alpine:3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5                                       0.1s
 => [tessera-example-mysql internal] load metadata for docker.io/library/golang:1.22.5-bookworm@sha256:af9b40f2b1851be993763b85288f8434af87b5678af04355b1e33ff530b5765f                            0.1s
 => [tessera-example-mysql build 1/6] FROM docker.io/library/golang:1.22.5-bookworm@sha256:af9b40f2b1851be993763b85288f8434af87b5678af04355b1e33ff530b5765f                                        0.0s
 => CACHED [tessera-example-mysql stage-1 1/2] FROM docker.io/library/alpine:3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5                                          0.0s
 => [tessera-example-mysql internal] load build context                                                                                                                                            0.2s
 => => transferring context: 139.88kB                                                                                                                                                              0.2s
 => CACHED [tessera-example-mysql build 2/6] WORKDIR /build                                                                                                                                        0.0s
 => CACHED [tessera-example-mysql build 3/6] COPY go.mod go.sum ./                                                                                                                                 0.0s
 => CACHED [tessera-example-mysql build 4/6] RUN go mod download && go mod verify                                                                                                                  0.0s
 => [tessera-example-mysql build 5/6] COPY . .                                                                                                                                                     0.4s
 => [tessera-example-mysql build 6/6] RUN CGO_ENABLED=0 go build -v ./cmd/example-mysql                                                                                                           35.0s
 => [tessera-example-mysql stage-1 2/2] COPY --from=build /build/example-mysql /build/cmd/example-mysql/docker/testdata/key /build/cmd/example-mysql/docker/testdata/key.pub /build/storage/mysql  0.1s
 => [tessera-example-mysql] exporting to image                                                                                                                                                     0.9s
 => => exporting layers                                                                                                                                                                            0.8s
 => => writing image sha256:b574a35fd52e2be01fe406e665253c9c0272e1819b09ef6ea7bcfab4036e879b                                                                                                       0.0s
 => => naming to docker.io/library/docker-tessera-example-mysql                                                                                                                                    0.0s
[+] Running 3/2
 ✔ Network docker_default           Created                                                                                                                                                        0.1s 
 ✔ Container tessera-mysql-db       Created                                                                                                                                                        0.1s 
 ✔ Container tessera-example-mysql  Created                                                                                                                                                        0.0s 
Attaching to tessera-example-mysql, tessera-mysql-db
tessera-mysql-db       | 2024-07-31 10:01:44+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.2-1.el9 started.
tessera-mysql-db       | 2024-07-31 10:01:45+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
tessera-mysql-db       | 2024-07-31 10:01:45+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.2-1.el9 started.
tessera-mysql-db       | 2024-07-31 10:01:45+00:00 [Note] [Entrypoint]: Initializing database files
tessera-mysql-db       | 2024-07-31T10:01:45.731261Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
tessera-mysql-db       | 2024-07-31T10:01:45.733597Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.4.2) initializing of server in progress as process 80
tessera-mysql-db       | 2024-07-31T10:01:45.746197Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
tessera-mysql-db       | 2024-07-31T10:01:46.535730Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
tessera-mysql-db       | 2024-07-31T10:01:50.444204Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
tessera-mysql-db       | 2024-07-31T10:01:53.625114Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
tessera-mysql-db       | 2024-07-31 10:01:53+00:00 [Note] [Entrypoint]: Database files initialized
tessera-mysql-db       | 2024-07-31 10:01:53+00:00 [Note] [Entrypoint]: Starting temporary server
tessera-mysql-db       | 2024-07-31T10:01:53.691561Z 0 [System] [MY-015015] [Server] MySQL Server - start.
tessera-mysql-db       | 2024-07-31T10:01:54.049385Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.2) starting as process 125
tessera-mysql-db       | 2024-07-31T10:01:54.078279Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
tessera-mysql-db       | 2024-07-31T10:01:54.852372Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
tessera-mysql-db       | 2024-07-31T10:01:55.562052Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
tessera-mysql-db       | 2024-07-31T10:01:55.562119Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
tessera-mysql-db       | 2024-07-31T10:01:55.570381Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
tessera-mysql-db       | 2024-07-31T10:01:55.636023Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
tessera-mysql-db       | 2024-07-31T10:01:55.636574Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
tessera-mysql-db       | 2024-07-31 10:01:55+00:00 [Note] [Entrypoint]: Temporary server started.
tessera-mysql-db       | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
tessera-mysql-db       | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
tessera-mysql-db       | 2024-07-31 10:01:59+00:00 [Note] [Entrypoint]: Creating database tessera
tessera-mysql-db       | 2024-07-31 10:01:59+00:00 [Note] [Entrypoint]: Creating user tessera
tessera-mysql-db       | 2024-07-31 10:01:59+00:00 [Note] [Entrypoint]: Giving user tessera access to schema tessera
tessera-mysql-db       | 
tessera-mysql-db       | 2024-07-31 10:01:59+00:00 [Note] [Entrypoint]: Stopping temporary server
tessera-mysql-db       | 2024-07-31T10:01:59.969270Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.4.2).
tessera-mysql-db       | 2024-07-31T10:02:00.788295Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.2)  MySQL Community Server - GPL.
tessera-mysql-db       | 2024-07-31T10:02:00.788350Z 0 [System] [MY-015016] [Server] MySQL Server - end.
tessera-mysql-db       | 2024-07-31 10:02:00+00:00 [Note] [Entrypoint]: Temporary server stopped
tessera-mysql-db       | 
tessera-mysql-db       | 2024-07-31 10:02:00+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
tessera-mysql-db       | 
tessera-mysql-db       | 2024-07-31T10:02:01.004486Z 0 [System] [MY-015015] [Server] MySQL Server - start.
tessera-mysql-db       | 2024-07-31T10:02:01.362183Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.2) starting as process 1
tessera-mysql-db       | 2024-07-31T10:02:01.371783Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
tessera-mysql-db       | 2024-07-31T10:02:02.112926Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
tessera-mysql-db       | 2024-07-31T10:02:02.729809Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
tessera-mysql-db       | 2024-07-31T10:02:02.729911Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
tessera-mysql-db       | 2024-07-31T10:02:02.740480Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
tessera-mysql-db       | 2024-07-31T10:02:02.823238Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
tessera-mysql-db       | 2024-07-31T10:02:02.823780Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
tessera-example-mysql  | I0731 10:02:06.203956       1 main.go:251] Initializing database schema
tessera-example-mysql  | I0731 10:02:06.303054       1 main.go:271] Database schema initialized
tessera-example-mysql  | I0731 10:02:06.324760       1 mysql.go:83] Initializing checkpoint
codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 31.13%. Comparing base (46ec9c2) to head (1b4de10). Report is 20 commits behind head on main.

Files Patch % Lines
cmd/example-mysql/main.go 0.00% 16 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #99 +/- ## ========================================== - Coverage 35.80% 31.13% -4.67% ========================================== Files 16 16 Lines 1363 1561 +198 ========================================== - Hits 488 486 -2 - Misses 801 1001 +200 Partials 74 74 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.