Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with documentation, add control server setup script and automatically create baas partition #49

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ValentijnvdBeek
Copy link
Collaborator

A collection of fixes for 2025.

  • Updates installation documentation for the changes made in 2022
  • Makes installation of the server easier
  • Replaces the deprecated hostname call with the standard ip
  • Automatically creates a disklabel, partition and filesystem on the first boot of the management os.

There is a bug in the go-diskfs library that makes it impossible
to create EXT4 partitions. It might be nicer to switch to this on
the long term. The code snippet for that is:

```go
log.Warn("Create new machine partition and disk label")
theDisk, err := diskfs.Open(image.DeviceFile[:len(image.DeviceFile)-1],
diskfs.WithOpenMode(diskfs.ReadWrite))
if err != nil {
   log.Fatalf("Failed to open disk: %v", err)
}

// Create a GPT table with one partition to store the meta data for BAAS
table := &gpt.Table{
  LogicalSectorSize:  512,
  PhysicalSectorSize: 512,
  ProtectiveMBR:      false,
  Partitions: []*gpt.Partition{
    {
      Type: gpt.LinuxFilesystem,
      Start: 2 * 1024 * 1024,  // 2MB
      Size:  20 * 1024 * 1024, // 20MB
      Name: "BAASPartition",
    },
  },
 }

err = theDisk.Partition(table)
if err != nil {
  log.Fatalf("Failed to create partition: %v", err)
}

 _, err = theDisk.CreateFilesystem(disk.FilesystemSpec{
   Partition: 1,
   FSType:    filesystem.TypeExt4,
   VolumeLabel: "BAAS-fs",
})

if err != nil {
   log.Fatalf("Failed to create filesystem: %v", err)
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant