okd311_vagrant
Differences
This shows you the differences between two versions of the page.
| okd311_vagrant [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | okd311_vagrant [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== OKD 3.11 ====== | ||
| - | <file bash> | ||
| - | $ mkdir files | ||
| - | $ cd files | ||
| - | </ | ||
| - | <file bash> | ||
| - | $ ssh-keygen -f key | ||
| - | Generating public/ | ||
| - | Enter passphrase (empty for no passphrase): | ||
| - | Enter same passphrase again: | ||
| - | Your identification has been saved in key. | ||
| - | Your public key has been saved in key.pub. | ||
| - | The key fingerprint is: | ||
| - | SHA256: | ||
| - | The key's randomart image is: | ||
| - | +---[RSA 2048]----+ | ||
| - | | .E= | ||
| - | | .B * = oo=+| | ||
| - | | o O * *.+..| | ||
| - | | o B + = oo .| | ||
| - | | o S * o .o | | ||
| - | | + o . . | | ||
| - | | . . o .| | ||
| - | | .oo| | ||
| - | | oo| | ||
| - | +----[SHA256]-----+ | ||
| - | </ | ||
| - | |||
| - | ===== Vagrant file ===== | ||
| - | |||
| - | <file ruby Vagrantfile> | ||
| - | # -*- mode: ruby -*- | ||
| - | # vi: set ft=ruby : | ||
| - | |||
| - | ENV[' | ||
| - | |||
| - | vms = { | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | } | ||
| - | |||
| - | Vagrant.configure(' | ||
| - | |||
| - | # | ||
| - | config.vm.box = ' | ||
| - | config.vm.box_check_update = false | ||
| - | |||
| - | vms.each do |name, conf| | ||
| - | config.vm.define "# | ||
| - | k.vm.hostname = "# | ||
| - | k.vm.network ' | ||
| - | k.vm.provider ' | ||
| - | lv.memory = conf[' | ||
| - | lv.cpus = conf[' | ||
| - | lv.cputopology :sockets => 1, :cores => conf[' | ||
| - | end | ||
| - | end | ||
| - | end | ||
| - | config.vm.provision " | ||
| - | end | ||
| - | </ | ||
| - | |||
| - | ===== Preparando o ambiente - em todos os nodes ===== | ||
| - | <file bash> | ||
| - | $ sudo yum install curl vim device-mapper-persistent-data lvm2 epel-release wget git net-tools bind-utils yum-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct docker | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo yum install java python-passlib pyOpenSSL PyYAML python-jinja2 python-paramiko python-setuptools python2-cryptography sshpass python-ipaddress | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo systemctl start docker | ||
| - | $ sudo systemctl enable docker | ||
| - | Created symlink from / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo rpm -i https:// | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo cp hosts-allinone / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ cat / | ||
| - | [OSEv3: | ||
| - | masters | ||
| - | nodes | ||
| - | etcd | ||
| - | |||
| - | [OSEv3: | ||
| - | ansible_ssh_user=root | ||
| - | docker_version=" | ||
| - | openshift_enable_olm=false | ||
| - | openshift_deployment_type=origin | ||
| - | openshift_enable_service_catalog=false | ||
| - | openshift_metrics_install_metrics=false | ||
| - | openshift_logging_install_logging=false | ||
| - | openshift_cluster_monitoring_operator_install=false | ||
| - | openshift_master_default_subdomain=' | ||
| - | openshift_disable_check=' | ||
| - | openshift_docker_options=' | ||
| - | openshift_master_identity_providers=[{' | ||
| - | |||
| - | [masters] | ||
| - | okd.example.com openshift_public_ip=' | ||
| - | |||
| - | [etcd] | ||
| - | okd.example.com etcd_ip=' | ||
| - | |||
| - | [nodes] | ||
| - | okd.example.com openshift_node_group_name=' | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo cp ansible.cfg / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ cat / | ||
| - | # config file for ansible -- http:// | ||
| - | # ============================================== | ||
| - | |||
| - | # This config file provides examples for running | ||
| - | # the OpenShift playbooks with the provided | ||
| - | # inventory scripts. | ||
| - | |||
| - | [defaults] | ||
| - | # Set the log_path | ||
| - | log_path = ~/ | ||
| - | |||
| - | # Additional default options for OpenShift Ansible | ||
| - | forks = 20 | ||
| - | host_key_checking = False | ||
| - | retry_files_enabled = False | ||
| - | retry_files_save_path = ~/ | ||
| - | nocows = True | ||
| - | remote_user = root | ||
| - | roles_path = roles/ | ||
| - | gathering = smart | ||
| - | fact_caching = jsonfile | ||
| - | fact_caching_connection = $HOME/ | ||
| - | fact_caching_timeout = 600 | ||
| - | callback_whitelist = profile_tasks | ||
| - | inventory_ignore_extensions = secrets.py, .pyc, .cfg, .crt, .ini | ||
| - | # work around privilege escalation timeouts in ansible: | ||
| - | timeout = 30 | ||
| - | |||
| - | # Uncomment to use the provided example inventory | ||
| - | #inventory = inventory/ | ||
| - | |||
| - | [inventory] | ||
| - | # fail more helpfully when the inventory file does not parse (Ansible 2.4+) | ||
| - | unparsed_is_failed=true | ||
| - | |||
| - | # Additional ssh options for OpenShift Ansible | ||
| - | [ssh_connection] | ||
| - | pipelining = True | ||
| - | ssh_args = -o ControlMaster=auto -o ControlPersist=600s | ||
| - | timeout = 10 | ||
| - | # shorten the ControlPath which is often too long; when it is, | ||
| - | # ssh connection reuse silently fails, making everything slower. | ||
| - | control_path = %(directory)s/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo mkdir -p /root/.ssh | ||
| - | $ sudo cp key.pub / | ||
| - | $ sudo cp key / | ||
| - | $ sudo chmod 400 / | ||
| - | $ sudo cp key.pub / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ HOSTS=" | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ echo -e " | ||
| - | 127.0.0.1 | ||
| - | ::1 | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ echo -e " | ||
| - | 172.27.11.10 okd.example.com | ||
| - | 172.27.11.20 node1.example.com | ||
| - | 172.27.11.30 node2.example.com | ||
| - | 172.27.11.40 extras.example.com | ||
| - | </ | ||
okd311_vagrant.1753560544.txt.gz · Last modified: by wikiadm
