<commit_before># This config is meant to be consumed by the config transpiler, which will
# generate the corresponding Ignition config. Do not pass this config directly
# to instances of Container Linux.

update:
  group:  "alpha"

locksmith:
  reboot_strategy: "etcd-lock"

storage:
  filesystems:
    - mount:
        device: /dev/disk/by-id/scsi-0Google_PersistentDisk_persistent-disk-1
        format: ext4
        create:
  files:
    - path: /opt/bin/gather_facts
      filesystem: root
      contents:
        remote:
          url: https://raw.githubusercontent.com/hkjn/junk/master/prototest/gather_facts
          verification:
            hash:
              function: sha512
              sum: adb4105abef8d0604417009ecc0b7863ddf5a91cbbe4e17a0fed0ffccd83f8eb49957f396ed7eb10c533d9ea11eae8eb76e2a1144809db2c1c59894d21b6f61c
      mode: 0755
    - path: /opt/bin/report_client
      filesystem: root
      contents:
        remote:
          url: https://github.com/hkjn/junk/releases/download/1.5.10/report_client_x86_64
          verification:
            hash:
              function: sha512
              sum: f8eae52ca28902ef2f675378143464f7e0e4847066d2b2cc3170bb758819ede4aad8a4a641be1037cb924812de88f5ef0eb6db46a69810cd3dcf0c3ced6f4f08
      mode: 0755
    - path: /opt/bin/decenter_world
      filesystem: root
      contents:
        remote:
          url: https://github.com/hkjn/decenter.world/releases/download/1.0.1/decenter_world_x86_64
          verification:
            hash:
              function: sha512
              sum: a4811fbd14348b28a978745594ec74e5838f72b293a3f801e74e5eb5538450bacabeb40892cd862d7df6c780aa1bfb8ec20431c076d7534345a32a2462a6bd66
      mode: 0755
# TODO: Fetch decenter_redirector_x86_64 from releases.
systemd:
  units:
    - name: report_client.service
      enable: true
      contents: |
        [Unit]
        Description=report client
        After=network-online.target
        
        [Service]
        Environment=PATH=/usr/bin/:/opt/bin:/bin
        Environment=REPORT_ADDR=mon.hkjn.me:50051
        Environment=REPORT_NAME=%H
        Environment=REPORT_FACTS_PATH=/etc/report_facts.json
        ExecStartPre=-/bin/bash -c "gather_facts > /etc/report_facts.json"
        ExecStart=/bin/bash -c report_client

        [Install]
        WantedBy=network-online.target
    - name: report_client.timer
      enable: true
      contents: |
        [Unit]
        Description=Timer that starts report_client.service

        [Timer]
        # Run every 5 min.
        OnCalendar=*:0/5
        Persistent=true

        [Install]
        WantedBy=local.target
    - name: decenter.service
      enable: true
      contents: |
        [Unit]
        Description=decenter.world server
        After=network-online.target

        [Service]
        Environment=PATH=/usr/bin/:/opt/bin:/bin
        Environment=DECENTER_WORLD_ADDR=:443
        ExecStart=/usr/bin/bash -c "decenter_world"
        Restart=always

        [Install]
        WantedBy=network-online.target
    - name: data.mount
      enable: true
      contents: |
        [Mount]
        What=/dev/disk/by-id/scsi-0Google_PersistentDisk_persistent-disk-1
        Where=/data
        Type=ext4

        [Install]
        RequiredBy=local-fs.target<commit_msg>Make decenter.world bootstrap fully automatic<commit_after># This config is meant to be consumed by the config transpiler, which will
# generate the corresponding Ignition config. Do not pass this config directly
# to instances of Container Linux.

update:
  group:  "alpha"

locksmith:
  reboot_strategy: "etcd-lock"

storage:
  filesystems:
    - mount:
        device: /dev/disk/by-id/scsi-0Google_PersistentDisk_persistent-disk-1
        format: ext4
        create:
  files:
    - path: /opt/bin/gather_facts
      filesystem: root
      contents:
        remote:
          url: https://raw.githubusercontent.com/hkjn/junk/master/prototest/gather_facts
          verification:
            hash:
              function: sha512
              sum: adb4105abef8d0604417009ecc0b7863ddf5a91cbbe4e17a0fed0ffccd83f8eb49957f396ed7eb10c533d9ea11eae8eb76e2a1144809db2c1c59894d21b6f61c
      mode: 0755
    - path: /opt/bin/report_client
      filesystem: root
      contents:
        remote:
          url: https://github.com/hkjn/junk/releases/download/1.5.10/report_client_x86_64
          verification:
            hash:
              function: sha512
              sum: f8eae52ca28902ef2f675378143464f7e0e4847066d2b2cc3170bb758819ede4aad8a4a641be1037cb924812de88f5ef0eb6db46a69810cd3dcf0c3ced6f4f08
      mode: 0755
    - path: /opt/bin/decenter_world
      filesystem: root
      contents:
        remote:
          url: https://github.com/hkjn/decenter.world/releases/download/1.1.1/decenter_world_x86_64
          verification:
            hash:
              function: sha512
              sum: 720604e3d5e594076f9ff2416a9a56b3354dc5255c0b42fe8de8aeb268b39eda80380f466b4834ab8812888995d83b96ff76948a90f7022d0ec0ef3bee4a2965
      mode: 0755
    - path: /opt/bin/decenter_redirector
      filesystem: root
      contents:
        remote:
          url: https://github.com/hkjn/decenter.world/releases/download/1.1.1/decenter_redirector_x86_64
          verification:
            hash:
              function: sha512
              sum: 8026412bcc856bb073e01a5b984e0a2161049b76e575cfc506bf733a03ca70ed2fffe0a83d269a578936a545066500603b3a86c9e6a47905376108b8af41837e
      mode: 0755
systemd:
  units:
    - name: report_client.service
      enable: true
      contents: |
        [Unit]
        Description=report client
        After=network-online.target
        
        [Service]
        Environment=PATH=/usr/bin/:/opt/bin:/bin
        Environment=REPORT_ADDR=mon.hkjn.me:50051
        Environment=REPORT_NAME=%H
        Environment=REPORT_FACTS_PATH=/etc/report_facts.json
        ExecStartPre=-/bin/bash -c "gather_facts > /etc/report_facts.json"
        ExecStart=/bin/bash -c report_client

        [Install]
        WantedBy=multi-user.target
    - name: report_client.timer
      enable: true
      contents: |
        [Unit]
        Description=Timer that starts report_client.service

        [Timer]
        # Run every 5 min.
        OnCalendar=*:0/5
        Persistent=true

        [Install]
        WantedBy=multi-user.target
    - name: decenter.service
      enable: true
      contents: |
        [Unit]
        Description=decenter.world server
        After=network-online.target

        [Service]
        Environment=PATH=/usr/bin/:/opt/bin:/bin
        Environment=DECENTER_WORLD_ADDR=:443
        ExecStart=/usr/bin/bash -c "decenter_world"
        Restart=always

        [Install]
        WantedBy=multi-user.target
    - name: decenter_redirector.service
      enable: true
      contents: |
        [Unit]
         Description=decenter.world redirector server
         After=network-online.target

         [Service]
         Environment=PATH=/usr/bin/:/opt/bin:/bin
         ExecStart=/usr/bin/bash -c "decenter_redirector"
         Restart=always

         [Install]
         WantedBy=network-online.target
    - name: data.mount
      enable: true
      contents: |
        [Mount]
        What=/dev/disk/by-id/scsi-0Google_PersistentDisk_persistent-disk-1
        Where=/data
        Type=ext4

        [Install]
        RequiredBy=local-fs.target
{'fraction_non_alphanumeric': 0.07994561522773623, 'fraction_numerical': 0.09218218898708362, 'mean_word_length': 2.2986547085201794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7511259', 'n_tokens_mistral': 2848, 'n_tokens_neox': 2452, 'n_words': 374}