|
| 1 | +--- |
| 2 | +title: DEBIAN Installation - UltraEdge |
| 3 | + |
| 4 | +weight: 4 |
| 5 | + |
| 6 | +layout: "learningpathall" |
| 7 | +--- |
| 8 | + |
| 9 | +#### Installation Process |
| 10 | + |
| 11 | +{{% notice Note %}} |
| 12 | +REMOVE ME: Need link information to "Uncloud" below... |
| 13 | +{{% /notice %}} |
| 14 | + |
| 15 | +- Copy device installation details from **Uncloud**. |
| 16 | +- Device Initialization |
| 17 | + |
| 18 | + 1. Copy the command below into the clipboard. |
| 19 | + 2. Open terminal on your device. |
| 20 | + 3. Paste the copied command into terminal to initialize the device. |
| 21 | + |
| 22 | + |
| 23 | + {{% notice Note %}} |
| 24 | +REMOVE ME: Not sure what "example code" means below... is this what the user needs to execute or is it just an example? |
| 25 | +{{% /notice %}} |
| 26 | + |
| 27 | + Just an example code. You will find the exact to execute for your device in unclound |
| 28 | + ```bash |
| 29 | + sudo apt update && sudo apt install curl && sudo apt install jq -y && sudo DEVICE_ID="5b3ff290-0c88-4cd9-8ef7-08de0bded9df" KEY="TB.ApiKey-mlBZgDFc7qyM6ztPjILBCbFEqnVlbvjUpM1Q1IqNP6tA7wNdi97AQ==" sh -c "$(curl "https://tinkerbloxdev.blob.core.windows.net:443/tinkerbloxdev/binaries/installer.sh?sv=2025-01-05&st=2025-11-03T06%3A31%3A55Z&se=2025-11-03T06%3A56%3A55Z&sr=b&sp=r&sig=HNS70HgJyHlhCVQrqvpGdCcaf8%2FtVjdW4RNiiiIPCSUA%3D")" |
| 30 | + ``` |
| 31 | + |
| 32 | +- Paste the copied content in the target terminal and execute. |
| 33 | + |
| 34 | +#### Activation of Agent |
| 35 | + |
| 36 | +On the first boot, the agent will automatically generate a file named |
| 37 | +`activation_key.json` at the path: |
| 38 | + |
| 39 | + /opt/tinkerblox/activation_key.json |
| 40 | + |
| 41 | +Share this `activation_key.json` file with the TinkerBlox team to |
| 42 | +receive license key (which includes license metadata). |
| 43 | + |
| 44 | +1. Stop the agent using the following command: |
| 45 | + |
| 46 | + sudo systemctl stop ultraedge.service |
| 47 | + |
| 48 | +2. Replace the existing `activation_key.json` file in |
| 49 | + `/opt/tinkerblox/` with the licensed one provided by TinkerBlox. |
| 50 | + |
| 51 | +3. Start the agent: |
| 52 | + |
| 53 | + sudo systemctl start ultraedge.service |
| 54 | + |
| 55 | +#### Manual Running |
| 56 | + |
| 57 | +- Binary path: `/usr/bin/EdgeBloXagent` |
| 58 | + |
| 59 | +- To start: |
| 60 | + |
| 61 | + EdgeBloXagent |
| 62 | + |
| 63 | +- To stop, press <span class="kbd">Ctrl</span> + |
| 64 | + <span class="kbd">C</span> once. |
| 65 | + |
| 66 | +## MicroPac Installation |
| 67 | + |
| 68 | +{{% notice Note %}} |
| 69 | +REMOVE ME: Is MicroPac only for Debian installations? Not for YOCTO ones? |
| 70 | +{{% /notice %}} |
| 71 | + |
| 72 | +#### System Requirements |
| 73 | + |
| 74 | +- Linux host (aarch64) |
| 75 | +- Sudo permissions |
| 76 | +- Overlay filesystem support |
| 77 | +- Internet connection |
| 78 | + |
| 79 | +#### Required Packages |
| 80 | + |
| 81 | + sudo apt-get update |
| 82 | + sudo apt-get install -y tar curl qemu-user-static binfmt-support |
| 83 | + |
| 84 | +### Cross-Architecture Support |
| 85 | + |
| 86 | +{{% notice Note %}} |
| 87 | +REMOVE ME: Might need a bit more detail on why this needs to be executed (below): |
| 88 | +{{% /notice %}} |
| 89 | + |
| 90 | +To build MicroPac for different architectures: |
| 91 | + # Enable binfmt for armv7 |
| 92 | + sudo update-binfmts --enable qemu-armv7 |
| 93 | + |
| 94 | +### Installation |
| 95 | + |
| 96 | +- The package is provided as a `.deb` file. |
| 97 | + |
| 98 | +- Install it on your host machine: |
| 99 | + |
| 100 | + sudo apt install ./<package_name>.deb |
| 101 | + |
| 102 | +### MicroPac File Schema file creation/setup |
| 103 | + |
| 104 | +{{% notice Note %}} |
| 105 | +REMOVE ME: Need more information on how to setup your project directory/where its located |
| 106 | +{{% /notice %}} |
| 107 | + |
| 108 | +Place a `MicroPacFile` in your project directory. |
| 109 | + |
| 110 | +```console |
| 111 | + name: nginx |
| 112 | + version: 1.0.0.0 |
| 113 | + target: aarch64 |
| 114 | + applicationType: custom |
| 115 | + image: Alpine:3.21 |
| 116 | + createdBy: developer@tinkerblox.io |
| 117 | + description: Nginx web server microservice |
| 118 | + |
| 119 | + buildSteps: |
| 120 | + # Install nginx and create necessary directories |
| 121 | + - run: apk add --no-cache nginx |
| 122 | + - run: mkdir -p /var/www/html /var/log/nginx /var/lib/nginx /var/tmp/nginx |
| 123 | + |
| 124 | + # Copy configuration files |
| 125 | + - copy: [nginx.conf, /etc/nginx/nginx.conf] |
| 126 | + - copy: [index.html, /var/www/html/index.html] |
| 127 | + - copy: [404.html, /var/www/html/404.html] |
| 128 | + |
| 129 | + # Copy startup script |
| 130 | + - workdir: /app |
| 131 | + - copy: [nginx_start.sh, .] |
| 132 | + - run: chmod +x ./nginx_start.sh |
| 133 | + |
| 134 | + # Set proper permissions |
| 135 | + #- run: chown -R nginx:nginx /var/www/html /var/log/nginx /var/lib/nginx /var/tmp/nginx |
| 136 | + |
| 137 | + entry: /app/nginx_start.sh |
| 138 | + mode: continuous-run |
| 139 | + |
| 140 | + env: |
| 141 | + NGINX_PORT: 8080 |
| 142 | + APP_ENV: production |
| 143 | + |
| 144 | + network: |
| 145 | + mode: host |
| 146 | + name: nginx-net |
| 147 | +``` |
| 148 | +### Configuration Fields |
| 149 | + |
| 150 | +#### Required Fields |
| 151 | + |
| 152 | +- **name**: Application name (≤ 10 characters) |
| 153 | +- **version**: Application version |
| 154 | +- **target**: Target architecture |
| 155 | +- **applicationType**: Application type (python, binary, custom) |
| 156 | +- **image**: Base image |
| 157 | +- **entry**: Entry point command |
| 158 | +- **mode**: single-run |
| 159 | + |
| 160 | +#### Optional Fields |
| 161 | + |
| 162 | +- **env**: Environment variable |
| 163 | +- **buildSteps**: Array of build instructions |
| 164 | +- **limits**: Resource limits (memory, cpu) |
| 165 | +- **mount**: Volume mount points |
| 166 | +- **network**: Network configuration |
| 167 | +- **createdBy**: maintanier of the application |
| 168 | +- **description**: description of the application |
| 169 | + |
| 170 | +### Building the MicroPac |
| 171 | + |
| 172 | +Navigate to your project directory and execute: |
| 173 | + |
| 174 | + sudo micropac-builder build |
| 175 | + |
| 176 | +This generates a file named `<project_name>.mpac`. |
| 177 | + |
| 178 | +{{% notice Note %}} |
| 179 | +REMOVE ME: Is there a way to confirm that Micropac is properly setup now? |
| 180 | +{{% /notice %}} |
0 commit comments