In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to build an image in Hypriot". In daily operation, I believe many people have doubts about how to build an image in Hypriot. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to build an image in Hypriot". Next, please follow the editor to study!
Hypriot- supports ARM64 server operating system
Hypriot currently supports the following hardware systems, which can support ARM64:
HypriotOS for the Raspberry Pi
HypriotOS for the NVIDIA ShieldTV
HypriotOS for the ODROID C1+
1. Download OS image
The following is a schematic diagram of the supported device usage:
2. Build image with source code
You can build SD card image locally and use Vagrant.
The repo code repository builds HypriotOS's SD card image, which can run on Raspberry Pi 1, 2, 3, and Zero. The pre-built SD card image can be found on the GitHub releases page. In order to build SD card image, we need to:
Get the file, from root filesystem, from os-rootfs.
Gets an empty raw filesystem from image-builder-raw with two partitions.
Add Hypriot's Debian repos.
Install Raspberry Pi kernel from rpi-kernel.
Install Docker tools and engines, Docker Compose and Docker Machine.
Set up the Build environment
First make sure that vagrant is installed. Then run the following command to create Vagrant box, and then use Vagrant Docker daemon. This Vagrant box needs to be run on guestfish inside. Use export VAGRANT_DEFAULT_PROVIDER=virtualbox to create a VirtualBox VM.
Start vagrant box
Vagrant up
Output docker host
Export DOCKER_HOST=tcp://127.0.0.1:2375
Check to see if Docker is running in vagrant.
Docker info | grep 'Operating System'Operating System: Ubuntu 16.04.3 LTS to build SD card image
Build the SD card image, and the output is written and compressed to hypriotos-rpi-dirty.img.zip.
Make sd-image runs Serverspec tests
To test SD card image, run the following command through Serverspec. Extend the SD card image in Docker container, and then run Serverspec tests, corresponding to the builder/test/ directory.
Make test3, swiping SD cards and testing
Now burn SD card image to Raspberry Pi and start it. Run the Serverspec integrity test, which corresponds to the builder/test-integration/ directory in the raspberry pie. Set the BOARD to the IP address or host name of the running raspberry pie.
Flash hypriotos-rpi-dirty.img.zipBOARD=black-pearl.local make test-integration
This test can work on any Docker Machine, so you don't need to create a Vagrant box.
@ use initialization files
You can specify the initialization file using flash-- userdata myinit.yml hypriot.img. The cloud-init mechanism will be used to initialize the system. For more information, please see the instructions in https://github.com/hypriot/flash, which is very convenient to use.
Note that the use of initialization files may take time to run during startup, and login errors occur. Wait patiently for the initialization process to be completed, the newly set hostname will appear, and then log in.
4. Set the network and CCS 4.1 set the static IP address
On Linux, it is usually specified through / etc/network/interfaces or / etc/network/interface.d/*.* file. If dhcpcd is installed, it is specified through the / etc/dhcpcd.conf file.
Currently, Hypriot does not use dhcpcd, immediately installed manually, and does not work, so you can only use the method of specifying interface files. Run as follows:
Sudo nano / etc/network/interfaces
Enter the following (IP address, etc., change to your own):
# interfaces (5) file used by ifup (8) and ifdown (8) # Include files from / etc/network/interfaces.d:# source-directory / etc/network/interfaces.d allow-hotplug wlan0iface eth0 inet staticaddress 192.168.1.97network 192.168.1.0netmask 255.255.255.0broadcast 192.168.1.255gateway 192.168.1.1dns-nameservers 8.8.8.The Enable Wifi AP SSIDwpa_conf / etc/wpa_supplicant/wpa_supplicant.conf
Or save it as a file / etc/network/interface.d/wlan0, or. The file will be included in interface when it starts.
4.2 configure WiFi Wireless access Point
Run the command (sudo nano / etc/wpa_supplicant/wpa_supplicant.conf) and enter the following (change MySSID and MyPassword to your own wireless router settings):
Ctrl_interface=/var/run/wpa_supplicantnetwork= {ssid= "MySSID" psk= "MyPassword" priority=1}
After saving, restart the network service (sudo service network restart).
4.3 install Portainer Container Management $docker volume create portainer_data$ docker run-d-p 9000 var/run/docker.sock:/var/run/docker.sock 9000-v / var/run/docker.sock:/var/run/docker.sock-v portainer_data:/data portainer/portainer
Get IP address: ifconfig
Remote ssh login: ssh pirate@192.168.199.101192.168.199.101 is the IP address obtained by ifconfig.
Then go to the browser and enter: http://192.168.199.101:9000 or similar address to manage the container service.
At this point, the study on "how to build an image in Hypriot" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.