install_fcos
Differences
This shows you the differences between two versions of the page.
| install_fcos [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | install_fcos [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Instalação do Fedora CoreOS ====== | ||
| - | <file bash> | ||
| - | ===== Passo 1 - gerar o arguivo ign ===== | ||
| - | |||
| - | $ ssh-keygen | ||
| - | Generating public/ | ||
| - | Enter file in which to save the key (/ | ||
| - | Enter passphrase (empty for no passphrase): | ||
| - | Enter same passphrase again: | ||
| - | Your identification has been saved in / | ||
| - | Your public key has been saved in / | ||
| - | The key fingerprint is: | ||
| - | SHA256: | ||
| - | The key's randomart image is: | ||
| - | +---[RSA 2048]----+ | ||
| - | | | | ||
| - | | | | ||
| - | | .oo . | | ||
| - | | ..ooo+.o | ||
| - | | | ||
| - | | = *+oo.. | ||
| - | |o o =oO. .. + | | ||
| - | |+. .+.o.+...o . | | ||
| - | |E.===oo+ .o+o | | ||
| - | +----[SHA256]-----+ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ cat ~/ | ||
| - | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE8eSuBSJmo/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ cat fcos.bu | ||
| - | variant: fcos | ||
| - | version: 1.4.0 | ||
| - | passwd: | ||
| - | users: | ||
| - | - name: core | ||
| - | ssh_authorized_keys: | ||
| - | - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE8eSuBSJmo/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo yum install podman | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo podman run --interactive --rm quay.io/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ cat fcos.ign | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | }, | ||
| - | " | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | ] | ||
| - | } | ||
| - | ] | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | ===== Passo 2 - criar um webserver para disponibilizar o arquivo ign ===== | ||
| - | <file bash> | ||
| - | sudo podman pod create --name nginx -p 8080:80 | ||
| - | sudo podman run --pod nginx --name nginx-server -d nginx: | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo podman cp fcos.ign nginx-server:/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ curl http:// | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | }, | ||
| - | " | ||
| - | " | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | ] | ||
| - | } | ||
| - | ] | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | ===== Passo 3 - download e instalação do fcos ===== | ||
| - | |||
| - | <file bash> | ||
| - | wget https:// | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo mv fedora-coreos-36.20220505.3.2-live.x86_64.iso / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo virt-install \ | ||
| - | --name=fcos-vm-01 \ | ||
| - | --vcpus=4 \ | ||
| - | --memory=8192 \ | ||
| - | --os-type linux \ | ||
| - | --os-variant=fedora32 \ | ||
| - | --disk size=100, | ||
| - | --cdrom / | ||
| - | --network bridge=virbr0 --nographics --console pty, | ||
| - | </ | ||
| - | |||
| - | |||
| - | Saída do comando: | ||
| - | <file bash> | ||
| - | $ sudo sudo virt-install \ | ||
| - | > --name=fcos-vm-01 \ | ||
| - | > --vcpus=4 \ | ||
| - | > --memory=8192 \ | ||
| - | > --os-type linux \ | ||
| - | > --os-variant=fedora32 \ | ||
| - | > --disk size=100, | ||
| - | > --cdrom / | ||
| - | e pty,ta> --network bridge=virbr0 --nographics --console pty, | ||
| - | WARNING | ||
| - | |||
| - | **Iniciando instalação...** | ||
| - | Alocando ' | ||
| - | Conectado ao domínio fcos-vm-01 | ||
| - | Caractere de escape é ^] | ||
| - | |||
| - | Fedora CoreOS 36.20220505.3.2 | ||
| - | Kernel 5.17.5-300.fc36.x86_64 on an x86_64 (hvc0) | ||
| - | |||
| - | SSH host key: SHA256: | ||
| - | SSH host key: SHA256: | ||
| - | SSH host key: SHA256: | ||
| - | Ignition: ran on 2022/06/21 19:10:52 UTC (this boot) | ||
| - | Ignition: no config provided by user | ||
| - | No SSH authorized keys provided by Ignition or Afterburn | ||
| - | localhost login: core (automatic login) | ||
| - | |||
| - | Last login: Tue Jun 21 19:11:02 on tty1 | ||
| - | Fedora CoreOS 36.20220505.3.2 | ||
| - | |||
| - | ########################################################################### | ||
| - | Welcome to the CoreOS live environment. This system is running completely | ||
| - | from memory, making it a good candidate for hardware discovery and | ||
| - | installing persistently to disk. Here is an example of running an install | ||
| - | to disk via coreos-installer: | ||
| - | |||
| - | sudo coreos-installer install /dev/sda \ | ||
| - | --ignition-url https:// | ||
| - | |||
| - | You may configure networking via 'sudo nmcli' or 'sudo nmtui' and have | ||
| - | that configuration persist into the installed system by passing the | ||
| - | ' | ||
| - | ' | ||
| - | install options. | ||
| - | ########################################################################### | ||
| - | |||
| - | [core@localhost ~]$ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ ip route | ||
| - | default via 192.168.122.1 dev ens3 proto dhcp metric 100 | ||
| - | 192.168.122.0/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ curl -OL http:// | ||
| - | % Total % Received % Xferd Average Speed | ||
| - | | ||
| - | 100 | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo fdisk -l | ||
| - | Disk /dev/vda: 100 GiB, 107374182400 bytes, 209715200 sectors | ||
| - | Units: sectors of 1 * 512 = 512 bytes | ||
| - | Sector size (logical/ | ||
| - | I/O size (minimum/ | ||
| - | |||
| - | |||
| - | Disk /dev/loop0: 678.42 MiB, 711376384 bytes, 1389407 sectors | ||
| - | Units: sectors of 1 * 512 = 512 bytes | ||
| - | Sector size (logical/ | ||
| - | I/O size (minimum/ | ||
| - | |||
| - | |||
| - | Disk /dev/loop1: 1.55 GiB, 1666125824 bytes, 3254152 sectors | ||
| - | Units: sectors of 1 * 512 = 512 bytes | ||
| - | Sector size (logical/ | ||
| - | I/O size (minimum/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo coreos-installer install /dev/vda --ignition-file fcos.ign | ||
| - | Installing Fedora CoreOS 36.20220505.3.2 x86_64 (512-byte sectors) | ||
| - | > Read disk 2.4 GiB/2.4 GiB (100%) | ||
| - | Writing Ignition config | ||
| - | Install complete. | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo reboot | ||
| - | </ | ||
| - | |||
| - | ===== Passo 4 - acessar a vm ===== | ||
| - | <file bash> | ||
| - | $ sudo virsh list | ||
| - | | ||
| - | ---------------------------------------------------- | ||
| - | | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo virsh dominfo fcos-vm-01 | ||
| - | Id: 32 | ||
| - | Nome: | ||
| - | UUID: | ||
| - | Tipo de SO: hvm | ||
| - | Estado: | ||
| - | CPU(s): | ||
| - | Tempo de CPU: | ||
| - | Memória máxima: 8388608 KiB | ||
| - | Memória utilizada: 8388608 KiB | ||
| - | Persistente: | ||
| - | Auto-iniciar: | ||
| - | Salvamento gerenciado: não | ||
| - | Modelo de segurança: selinux | ||
| - | DOI de segurança: 0 | ||
| - | Rótulo de segurança: system_u: | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo virsh domiflist fcos-vm-01 | ||
| - | Interface | ||
| - | ------------------------------------------------------- | ||
| - | vnet0 bridge | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo virsh net-dhcp-leases default | ||
| - | | ||
| - | ------------------------------------------------------------------------------------------------------------------- | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ ssh core@192.168.122.86 | ||
| - | The authenticity of host ' | ||
| - | ECDSA key fingerprint is SHA256: | ||
| - | ECDSA key fingerprint is MD5: | ||
| - | Are you sure you want to continue connecting (yes/no)? yes | ||
| - | Warning: Permanently added ' | ||
| - | Fedora CoreOS 36.20220522.3.0 | ||
| - | Tracker: https:// | ||
| - | Discuss: https:// | ||
| - | </ | ||
| - | |||
| - | ===== Referências ===== | ||
| - | - [[https:// | ||
| - | - [[https:// | ||
| - | - [[https:// | ||
| - | - [[https:// | ||
install_fcos.1753560544.txt.gz · Last modified: by wikiadm
