Skip to content

Commit

Permalink
Ready for release v0.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Volkan Özçelik <[email protected]>
  • Loading branch information
v0lkan committed Nov 22, 2024
1 parent 4965662 commit e56d79d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
5 changes: 3 additions & 2 deletions app/keeper/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
const appName = "SPIKE Keeper"

func main() {
log.Log().Info(appName, "msg", appName, "version", config.KeeperVersion)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand All @@ -33,9 +35,8 @@ func main() {
trust.Authenticate(spiffeid)

log.Log().Info(appName,
"msg", fmt.Sprintf("Starting service: %s v%s",
"msg", fmt.Sprintf("Started service: %s v%s",
appName, config.KeeperVersion))

if err := net.Serve(
source, handle.InitializeRoutes,
auth.CanTalkToKeeper,
Expand Down
9 changes: 6 additions & 3 deletions app/nexus/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main
import (
"context"
"errors"
"fmt"
"time"

"github.com/spiffe/spike/app/nexus/internal/env"
Expand All @@ -24,6 +25,8 @@ import (
const appName = "SPIKE Nexus"

func main() {
log.Log().Info(appName, "msg", appName, "version", config.NexusVersion)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -53,9 +56,9 @@ func main() {
defer ticker.Stop()
go poll.Tick(ctx, source, ticker)

log.Log().Info(appName, "msg",
"Starting service.", "version", config.NexusVersion)

log.Log().Info(appName,
"msg", fmt.Sprintf("Started service: %s v%s",
appName, config.NexusVersion))
if err := net.Serve(
source, handle.InitializeRoutes,
auth.CanTalkToNexus,
Expand Down
11 changes: 11 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ cd $WORKSPACE/spike
Once SPIRE Server is running, start the SPIRE Agent:

```bash
# The below script will ask for your password to give privileges to SPIRE Agent.
#
# This will allow SPIRE agent to introspect the system and get information
# about the running processes (path information, user information, SHA256 of the
# binary, etc.). This is part of the SPIRE Agent's workload attestation process.
# Without this, SPIRE Agent will have limited access to the system and may not
# be able to fully attest the workloads.
./hack/spire-agent-starter.sh
```

Expand All @@ -130,6 +138,9 @@ window.
Start the workloads:

```bash
# Optional: Increase the log level to debug:
export SPIKE_SYSTEM_LOG_LEVEL=debug
cd $WORKSPACE/spike
./nexus # Nexus
./keeper # Keeper
Expand Down
2 changes: 2 additions & 0 deletions hack/register-leonardo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
PILOT_PATH="$(pwd)/spike"
PILOT_SHA=$(sha256sum "$PILOT_PATH" | cut -d' ' -f1)

echo "Copying SPIKE pilot to /usr/local/bin/spike..."
sudo cp "$PILOT_PATH" /usr/local/bin/spike
echo "Copied SPIKE pilot to /usr/local/bin/spike."

PILOT_PATH="$(pwd)/spike"
PILOT_SHA=$(sha256sum "$PILOT_PATH" | cut -d' ' -f1)
Expand Down
10 changes: 3 additions & 7 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import (
"path/filepath"
)

const NexusVersion = "0.1.0"
const PilotVersion = "0.1.0"
const KeeperVersion = "0.1.0"

const NexusIssuer = "spike-nexus"
const NexusAdminSubject = "spike-admin"
const NexusAdminTokenId = "spike-admin-jwt"
const NexusVersion = "0.2.0"
const PilotVersion = "0.2.0"
const KeeperVersion = "0.2.0"

// SpikeNexusDataFolder returns the path to the directory where Nexus stores
// its encrypted backup for its secrets and other data.
Expand Down
3 changes: 3 additions & 0 deletions internal/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package log

import (
"fmt"
"log"
"log/slog"
"os"
Expand Down Expand Up @@ -32,6 +33,8 @@ func Log() *slog.Logger {
Level: env.LogLevel(),
}

fmt.Println("loglevel: ", opts.Level)

handler := slog.NewJSONHandler(os.Stdout, opts)

logger = slog.New(handler)
Expand Down

0 comments on commit e56d79d

Please sign in to comment.