diff --git a/config/mikrotik_hap-ac3-exit b/config/mikrotik_hap-ac3-exit new file mode 100644 index 00000000..1fb700eb --- /dev/null +++ b/config/mikrotik_hap-ac3-exit @@ -0,0 +1,119 @@ +CONFIG_TARGET_ipq40xx=y +CONFIG_TARGET_ipq40xx_mikrotik=y +CONFIG_TARGET_ipq40xx_mikrotik_DEVICE_mikrotik_hap-ac3=y +CONFIG_HTOP_LMSENSORS=y +CONFIG_IFSTAT_SNMP=y +CONFIG_LIBCURL_COOKIES=y +CONFIG_LIBCURL_FILE=y +CONFIG_LIBCURL_FTP=y +CONFIG_LIBCURL_HTTP=y +CONFIG_LIBCURL_MBEDTLS=y +CONFIG_LIBCURL_NGHTTP2=y +CONFIG_LIBCURL_NO_SMB="!" +CONFIG_LIBCURL_PROXY=y +CONFIG_LIBCURL_UNIX_SOCKETS=y +CONFIG_OPENSSL_ENGINE=y +CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y +CONFIG_OPENSSL_WITH_ASM=y +CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y +CONFIG_OPENSSL_WITH_CMS=y +CONFIG_OPENSSL_WITH_DEPRECATED=y +CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y +CONFIG_OPENSSL_WITH_IDEA=y +CONFIG_OPENSSL_WITH_MDC2=y +CONFIG_OPENSSL_WITH_PSK=y +CONFIG_OPENSSL_WITH_SEED=y +CONFIG_OPENSSL_WITH_SRP=y +CONFIG_OPENSSL_WITH_TLS13=y +CONFIG_OPENSSL_WITH_WHIRLPOOL=y +CONFIG_PACKAGE_althea-babeld=y +CONFIG_PACKAGE_althea-cron-jobs=y +CONFIG_PACKAGE_althea-tools=y +CONFIG_PACKAGE_althea-usb=y +CONFIG_PACKAGE_block-mount=y +CONFIG_PACKAGE_ca-certificates=y +CONFIG_PACKAGE_curl=y +CONFIG_PACKAGE_e2fsprogs=y +CONFIG_PACKAGE_htop=y +CONFIG_PACKAGE_ifstat=y +CONFIG_PACKAGE_iftop=y +CONFIG_PACKAGE_iperf3=y +CONFIG_PACKAGE_ipset=y +# CONFIG_PACKAGE_kmod-ath10k-ct is not set +CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=y +CONFIG_PACKAGE_kmod-crypto-kpp=y +CONFIG_PACKAGE_kmod-crypto-lib-chacha20=y +CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=y +CONFIG_PACKAGE_kmod-crypto-lib-curve25519=y +CONFIG_PACKAGE_kmod-crypto-lib-poly1305=y +CONFIG_PACKAGE_kmod-crypto-sha256=y +CONFIG_PACKAGE_kmod-fs-ext4=y +CONFIG_PACKAGE_kmod-ipt-core=y +CONFIG_PACKAGE_kmod-ipt-ipset=y +# CONFIG_PACKAGE_kmod-ledtrig-gpio is not set +CONFIG_PACKAGE_kmod-lib-crc16=y +CONFIG_PACKAGE_kmod-mii=y +CONFIG_PACKAGE_kmod-nf-ipt=y +CONFIG_PACKAGE_kmod-sched-cake=y +CONFIG_PACKAGE_kmod-sched-core=y +CONFIG_PACKAGE_kmod-scsi-core=y +CONFIG_PACKAGE_kmod-udptunnel4=y +CONFIG_PACKAGE_kmod-udptunnel6=y +CONFIG_PACKAGE_kmod-usb-ehci=y +CONFIG_PACKAGE_kmod-usb-net=y +CONFIG_PACKAGE_kmod-usb-net-cdc-eem=y +CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y +CONFIG_PACKAGE_kmod-usb-net-cdc-mbim=y +CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y +CONFIG_PACKAGE_kmod-usb-net-cdc-subset=y +CONFIG_PACKAGE_kmod-usb-net-ipheth=y +CONFIG_PACKAGE_kmod-usb-net-rtl8150=y +CONFIG_PACKAGE_kmod-usb-net-rtl8152=y +CONFIG_PACKAGE_kmod-usb-ohci=y +CONFIG_PACKAGE_kmod-usb-ohci-pci=y +CONFIG_PACKAGE_kmod-usb-storage=y +CONFIG_PACKAGE_kmod-usb-storage-uas=y +CONFIG_PACKAGE_kmod-usb-uhci=y +CONFIG_PACKAGE_kmod-usb-wdm=y +CONFIG_PACKAGE_kmod-usb2=y +CONFIG_PACKAGE_kmod-usb2-pci=y +CONFIG_PACKAGE_kmod-wireguard=y +CONFIG_PACKAGE_libatomic=y +CONFIG_PACKAGE_libblkid=y +CONFIG_PACKAGE_libcomerr=y +CONFIG_PACKAGE_libcurl=y +CONFIG_PACKAGE_libevdev=y +CONFIG_PACKAGE_libevent2-core=y +CONFIG_PACKAGE_libext2fs=y +CONFIG_PACKAGE_libiperf3=y +CONFIG_PACKAGE_libipset=y +CONFIG_PACKAGE_libncurses=y +CONFIG_PACKAGE_libnetsnmp=y +CONFIG_PACKAGE_libnghttp2=y +CONFIG_PACKAGE_libopenssl=y +CONFIG_PACKAGE_libpcap=y +CONFIG_PACKAGE_libpci=y +CONFIG_PACKAGE_libpcre=y +CONFIG_PACKAGE_libpcre2=y +CONFIG_PACKAGE_librt=y +CONFIG_PACKAGE_libss=y +CONFIG_PACKAGE_libudev-zero=y +CONFIG_PACKAGE_libusb-1.0=y +CONFIG_PACKAGE_libustream-mbedtls=m +CONFIG_PACKAGE_libustream-openssl=y +CONFIG_PACKAGE_libuuid=y +CONFIG_PACKAGE_mtr-nojson=y +CONFIG_PACKAGE_nano=y +CONFIG_PACKAGE_r8152-firmware=y +CONFIG_PACKAGE_rita-exit-dash=y +CONFIG_PACKAGE_rpcd=y +CONFIG_PACKAGE_tc-tiny=y +CONFIG_PACKAGE_tcpdump=y +CONFIG_PACKAGE_terminfo=y +CONFIG_PACKAGE_tmux=y +CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_usbutils=y +CONFIG_PACKAGE_vim-full=y +CONFIG_PACKAGE_wireguard-tools=y +CONFIG_PCRE2_JIT_ENABLED=y +CONFIG_PCRE_JIT_ENABLED=y diff --git a/config/x86_64-exit b/config/x86_64-exit index d12f7bae..b59da243 100644 --- a/config/x86_64-exit +++ b/config/x86_64-exit @@ -28,7 +28,8 @@ CONFIG_OPENSSL_WITH_SRP=y CONFIG_OPENSSL_WITH_TLS13=y CONFIG_PACKAGE_althea-babeld=y CONFIG_PACKAGE_althea-cron-jobs=y -CONFIG_PACKAGE_althea-exit=y +CONFIG_PACKAGE_rita-exit=y +CONFIG_PACKAGE_rita-exit_dash=y CONFIG_PACKAGE_althea-tools=y CONFIG_PACKAGE_ca-certificates=y CONFIG_PACKAGE_curl=y diff --git a/profiles/devices/glb1300-extender.yml b/profiles/devices/glb1300-extender.yml index aa4733e3..23ab25dc 100644 --- a/profiles/devices/glb1300-extender.yml +++ b/profiles/devices/glb1300-extender.yml @@ -4,7 +4,7 @@ package_id: arm_cortex-a7_neon-vfpv4 image_paths: - "ipq40xx/generic/openwrt-ipq40xx-generic-glinet_gl-b1300-squashfs-sysupgrade.bin" supported: true -extender: true +rita_type: "extender" channel: 11 # 5ghz note only 20mhz channel widths diff --git a/profiles/devices/mikrotik_hap-ac2-extender.yml b/profiles/devices/mikrotik_hap-ac2-extender.yml index 06d55d6d..f8650214 100644 --- a/profiles/devices/mikrotik_hap-ac2-extender.yml +++ b/profiles/devices/mikrotik_hap-ac2-extender.yml @@ -5,7 +5,7 @@ image_paths: - "ipq40xx/mikrotik/openwrt-ipq40xx-mikrotik-mikrotik_hap-ac2-initramfs-kernel.bin" - "ipq40xx/mikrotik/openwrt-ipq40xx-mikrotik-mikrotik_hap-ac2-squashfs-sysupgrade.bin" supported: true -extender: true +rita_type: "extender" private_radio: - radio0 diff --git a/profiles/devices/x86_64.yml b/profiles/devices/x86_64.yml index 62ae712c..2f2606a4 100644 --- a/profiles/devices/x86_64.yml +++ b/profiles/devices/x86_64.yml @@ -5,11 +5,12 @@ # To flash just untar the ext4 image and write it to a flash drive +rita_type: "exit" # used to select which config -conf_to_build: x86_64 +conf_to_build: x86_64-exit # used in op tools and althea-firmware-release -device: x86_64 +device_template: x86_64 # used in /etc/customfeeds.conf path package_id: x86_64 @@ -20,14 +21,9 @@ image_paths: - "x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz" - "x86/64/openwrt-x86-64-generic-squashfs-combined.vdi" - "x86/64/openwrt-x86-64-generic-squashfs-combined.vmdk" - # - "x86/64/openwrt-x86-64-generic-ext4-combined.img.gz" - # - "x86/64/openwrt-x86-64-generic-image.iso" supported: true -channel: 11 -five_ghz_channel: 36 - listen_interfaces: - eth2 - eth3 diff --git a/profiles/exit/config-example.yml b/profiles/exit/config-example.yml deleted file mode 100644 index bf396027..00000000 --- a/profiles/exit/config-example.yml +++ /dev/null @@ -1,91 +0,0 @@ -### build overrides - -rita_type: "exit" -conf_to_build: "x86_64-exit" -device_template: "x86_64" - -##### rita-exit.toml variables - -allowed_country_codes: "['US']" -database_uri: "postgresql://..." -description: "Althea Exit Description" -remote_log: "false" -workers: 1 - -### [exit_network] - -entry_timeout: 7776000 -exit_hello_port: 4875 -exit_price: 10000000 -exit_start_ip: "172.168.0.100" -# geoip_api_key: "" -# geoip_api_user: "" -own_internal_ip: "172.168.0.254" -own_internal_netmask: 16 -wg_exit_public_key: "..." -wg_exit_private_key: "..." -wg_tunnel_port: 60000 - -### [localization] -display_currency_symbol: "true" -wyre_enabled: "false" - -### [localization.support_number.code] -support_number_code_source: "plus" -support_number_code_value: 1 - -### [localization.support_number.national] -support_number_value: 5555555555 -support_number_zeros: 0 - -### [network] - -exit_mesh_ip: "fd01::1/128" -exit_metric_factor: 1900 -exit_direct_peer_interfaces: [] -exit_direct_peer_vlans: [] -nickname: "Althea Example Exit" -wan_interface: "eth0" -wan_proto: "dhcp" -# wan_proto: "static" -# wan_ipaddr: "1.1.1.2/24" -# wan_ip6addr: "fd00::1/8" -# wan_gateway: "1.1.1.1" -# wan_dns: -# - "8.8.8.8" -# - "8.8.4.4" -wg_private_key: "" -wg_public_key: "" - -### [network.shaper_settings] - -network_shaper_enabled: "true" - -### [payment] - -bridge_enabled: "true" -debt_limit_enabled: "true" -eth_private_key: "" -free_tier_throughput: 1000 -max_fee: 500000000 -full_nodes: ["https://dai.althea.net:443"] -system_chain: "Xdai" - -### [verif_settings] - -mailer: false -# email_address: "exit@example.com" -# smtp_url: "smtp.fastmail.com" -# smtp_domain: "mail.example.com" -# smtp_username: "exit@example.com" -# smtp_password: "" -# balance_notification_interval: 86400 -# notify_low_balance: "true" -# test: "false" -# test_dir: "" -phone: false -# phone_auth_api_key: "" -# send_number: "+15555555555" -# twillio_account_id: "" -# twillio_auth_token: "" -# balance_notification_body: "Your Althea router has a low balance! Your service will be slow until more funds are added. Visit althea.net/top-up" diff --git a/profiles/exit/mikrotik_hap-ac3.yml b/profiles/exit/mikrotik_hap-ac3.yml new file mode 100644 index 00000000..c5149b62 --- /dev/null +++ b/profiles/exit/mikrotik_hap-ac3.yml @@ -0,0 +1,29 @@ +rita_type: "exit" +conf_to_build: "mikrotik_hap-ac3-exit" + +device: mikrotik_hap-ac3 +package_id: arm_cortex-a7_neon-vfpv4 +image_paths: + - "ipq40xx/mikrotik/openwrt-ipq40xx-mikrotik-mikrotik_hap-ac3-initramfs-kernel.bin" + - "ipq40xx/mikrotik/openwrt-ipq40xx-mikrotik-mikrotik_hap-ac3-squashfs-sysupgrade.bin" +supported: true + +private_radio: + - radio0 + - radio1 + +channel: 11 +# 5ghz note only 20mhz channel widths +five_ghz_channel: 36 + +# Reference value, see network.j2 to modify +wan_interface: "wan" + +listen_interfaces: + - lan2 + - lan3 + - lan4 + +lan_interfaces: "lan1" + +rust_target: armv7-unknown-linux-musleabihf diff --git a/profiles/exit/x86_64.yml b/profiles/exit/x86_64.yml new file mode 100644 index 00000000..89b4e964 --- /dev/null +++ b/profiles/exit/x86_64.yml @@ -0,0 +1,41 @@ +# Config for generic x86_64 pc's as an exit, setup for 5 ports currently. +# as a note PCI cards seem to start with eth0 as the first port on the +# lowest number pci slot card, counting down, then returning to the mobo port +# this may not always hold true + +# To flash just untar the ext4 image and write it to a flash drive or internal disk +rita_type: "exit" + +# used to select which config +conf_to_build: x86_64-exit + +# used in op tools and althea-firmware-release +device: x86_64 + +# used in /etc/customfeeds.conf path +package_id: x86_64 + +# used to copy images to completed-images upon completion +image_paths: + - "x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz" + - "x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img.gz" + - "x86/64/openwrt-x86-64-generic-squashfs-combined.vdi" + - "x86/64/openwrt-x86-64-generic-squashfs-combined.vmdk" + +supported: true + +listen_interfaces: + - eth2 + - eth3 + - eth4 + - eth5 + - eth6 + - eth7 + - eth8 + +lan_interfaces: "eth1" + +# Reference value, see network.j2 to modify +wan_interface: "eth0" + +rust_target: x86_64-unknown-linux-musl diff --git a/roles/build-config/defaults/main.yml b/roles/build-config/defaults/main.yml index c995bb75..2291172f 100644 --- a/roles/build-config/defaults/main.yml +++ b/roles/build-config/defaults/main.yml @@ -42,11 +42,9 @@ listen_interfaces_extended: "{{listen_interfaces + hardcoded_interfaces}}" ####### exit defaults -allowed_country_codes: "['US']" -# database_uri: "postgresql://..." description: "Althea Exit Description" remote_log: "false" -workers: 1 +workers: 4 ### [exit_network] entry_timeout: 7776000 @@ -57,7 +55,8 @@ exit_start_ip: "172.168.0.100" # geoip_api_user: "" own_internal_ip: "172.168.0.254" own_internal_netmask: 16 -wg_tunnel_port: 60000 +wg_tunnel_port: 59999 +wg_v2_tunnel_port: 59998 ### [localization] display_currency_symbol: "true" @@ -72,8 +71,6 @@ support_number_value: 8664258432 support_number_zeroes: 0 ### [network] -bounty_port: 8888 -exit_mesh_ip: "fd01::1/128" exit_metric_factor: 1900 exit_direct_peer_interfaces: [] exit_direct_peer_vlans: [] @@ -91,6 +88,8 @@ rita_hello_port: 4876 wg_private_key: "" wg_public_key: "" wg_start_port: 60000 +# invalid placeholder replace with real value on Althea L1 once deployed +registered_users_contract_addr: "0xEE8BBA37508cd6f9dB7c8AD0AE2b3DE0168c1b36" ### [network.shaper_settings] network_shaper_enabled: "true" @@ -98,26 +97,7 @@ network_shaper_enabled: "true" ### [payment] bridge_enabled: "true" debt_limit_enabled: "true" -eth_private_key: "0x0101010101010101010101010101010101010101" free_tier_throughput: 1000 max_fee: 20000000 full_nodes: ["https://dai.althea.net:443"] system_chain: "Xdai" - -### [verif_settings] -mailer: false -# email_address: "exit@example.com" -# smtp_url: "smtp.fastmail.com" -# smtp_domain: "mail.example.com" -# smtp_username: "exit@example.com" -# smtp_password: "" -# balance_notification_interval: 86400 -# notify_low_balance: "true" -# test: "false" -# test_dir: "" -phone: false -# phone_auth_api_key: "" -# send_number: "+15555555555" -# twillio_account_id: "" -# twillio_auth_token: "" -# balance_notification_body: "Your Althea router has a low balance! Your service will be slow until more funds are added. Visit althea.net/top-up" diff --git a/roles/build-config/tasks/main.yml b/roles/build-config/tasks/main.yml index f99ec6f8..6094788d 100644 --- a/roles/build-config/tasks/main.yml +++ b/roles/build-config/tasks/main.yml @@ -93,7 +93,7 @@ - name: Template the rita-exit config template: src: rita_exit.toml.j2 - dest: "{{source_dir}}/files/etc/rita-exit.toml" + dest: "{{source_dir}}/files/etc/rita_exit.toml" when: rita_type == "exit" - name: Write out build details diff --git a/roles/build-config/templates/mikrotik_hap-ac3-exit-network.j2 b/roles/build-config/templates/mikrotik_hap-ac3-exit-network.j2 new file mode 100644 index 00000000..84c5e0f3 --- /dev/null +++ b/roles/build-config/templates/mikrotik_hap-ac3-exit-network.j2 @@ -0,0 +1,42 @@ +config globals 'globals' + option ula_prefix 'auto' + +{% if wan_interface is defined %} +config interface 'backhaul' + option ifname '{{wan_interface}}' + option proto {{ 'dhcp' if not wan_proto is defined else wan_proto }} +{% if wan_ipaddr is defined %} + option ipaddr '{{wan_ipaddr}}' +{% endif %} +{% if wan_gateway is defined %} + option gateway '{{wan_gateway}}' +{% endif %} +{% if wan_dns is defined %} +{% for dns in wan_dns %} + list dns '{{dns}}' +{% endfor %} +{% endif %} +{% endif %} + +{% if wan_interface is defined %} +config interface 'backhaul' + option ifname '{{wan_interface}}' + option proto {{ 'dhcp' if not wan_proto is defined else wan_proto }} +{% if wan_ipaddr is defined %} + option ipaddr '{{wan_ipaddr}}' +{% endif %} +{% if wan_gateway is defined %} + option gateway '{{wan_gateway}}' +{% endif %} +{% if wan_dns is defined %} +{% for dns in wan_dns %} + list dns '{{dns}}' +{% endfor %} +{% endif %} +{% endif %} + +{% for interface in listen_interfaces %} +config interface 'rita_{{interface | replace(".","")}}' + option ifname {{interface}} + option proto static +{% endfor %} diff --git a/roles/build-config/templates/rita.toml.j2 b/roles/build-config/templates/rita.toml.j2 index 8cbf17fa..40fca918 100644 --- a/roles/build-config/templates/rita.toml.j2 +++ b/roles/build-config/templates/rita.toml.j2 @@ -2,13 +2,11 @@ buffer_period = 3 [network] -bounty_ip = "fd00::1337:0e1f" babel_port = 6872 rita_contact_port = 4874 rita_hello_port = 4876 rita_dashboard_port = 4877 rita_tick_interval = 5 -bounty_port = 8888 wg_private_key_path = "/tmp/priv" wg_start_port = 60000 tunnel_timeout_seconds = 900 diff --git a/roles/build-config/templates/rita_exit.toml.j2 b/roles/build-config/templates/rita_exit.toml.j2 index 20c4db8d..e6dc03ff 100644 --- a/roles/build-config/templates/rita_exit.toml.j2 +++ b/roles/build-config/templates/rita_exit.toml.j2 @@ -1,13 +1,12 @@ -allowed_countries = {{allowed_country_codes}} -db_uri = "{{database_uri}}" +allowed_countries = [] description = "{{description}}" remote_log = {{remote_log}} -workers = "{{workers}}" +workers = {{workers}} [exit_network] entry_timeout = {{entry_timeout}} -exit_hello_port = "{{exit_hello_port}}" +exit_hello_port = {{exit_hello_port}} exit_price = {{exit_price}} exit_start_ip = "{{exit_start_ip}}" {% if geoip_api_key is defined %} @@ -18,38 +17,22 @@ geoip_api_user = "{{geoip_api_user}}" {% endif %} netmask = {{own_internal_netmask}} own_internal_ip = "{{own_internal_ip}}" -wg_private_key = "{{wg_exit_private_key}}" wg_private_key_path = "/tmp/exit-priv" -wg_public_key = "{{wg_exit_public_key}}" wg_tunnel_port = {{wg_tunnel_port}} - - -[localization] -display_currency_symbol = {{display_currency_symbol}} -wyre_enabled = {{wyre_enabled}} - -[localization.support_number.code] -source = "{{support_number_code_source}}" -value = {{support_number_code_value}} - -[localization.support_number.national] -value = {{support_number_value}} -zeros = {{support_number_zeroes}} +wg_v2_tunnel_port = {{wg_v2_tunnel_port}} +registered_users_contract_addr = "{{registered_users_contract_addr}}" [network] babel_port = 6872 backup_created = false -bounty_port = {{bounty_port}} discovery_ip = "ff02::1:8" {% if wan_interface is defined %} external_nic = "{{wan_interface}}" {% elif external_nic is defined %} external_nic = "{{external_nic}}" {% endif %} -light_client_hello_port = 4878 manual_peers = [] -mesh_ip = "{{exit_mesh_ip}}" -metric_factor = "{{exit_metric_factor}}" +metric_factor = {{exit_metric_factor}} nickname = "{{nickname}}" peer_interfaces = [{% for iface in (exit_direct_peer_interfaces + exit_direct_peer_vlans) %}"{{iface}}"{{ "," if not loop.last else "" }}{% endfor %}] rita_contact_port = 4874 @@ -58,9 +41,7 @@ rita_hello_port = {{rita_hello_port}} rita_tick_interval = 5 usage_tracker_file = "/etc/rita-usage-tracker.json" user_set_release_feed = false -wg_private_key = "{{wg_private_key}}" wg_private_key_path = "/tmp/priv" -wg_public_key = "{{wg_public_key}}" wg_start_port = {{wg_start_port}} [network.shaper_settings] @@ -75,18 +56,14 @@ bridge_enabled = {{bridge_enabled}} client_can_use_free_tier = true close_threshold = "-504000000000000000" debt_limit_enabled = {{debt_limit_enabled}} -debts_file = "/etc/rita-debts.json" +debts_file = "/etc/rita-exit-debts.json" dynamic_fee_multiplier = 6000 -eth_private_key = "{{eth_private_key}}" forgive_on_reboot = false free_tier_throughput = {{free_tier_throughput}} fudge_factor = 0 gas_price = "1000000000" light_client_fee = 0 local_fee = 0 -max_fee = "{{max_fee}}" -max_gas = "1000000000" -min_gas = "1000000000" net_version = "100" node_list = [{% for node in full_nodes %}"{{node}}"{{ "," if not loop.last else "" }}{% endfor %}] nonce = "1035843" @@ -94,36 +71,4 @@ pay_threshold = "126000000000000000" simulated_transaction_fee = 10 simulated_transaction_fee_address = "0xEE8BBA37508cd6f9dB7c8AD0AE2b3DE0168c1b36" system_chain = "{{system_chain}}" -withdraw_chain = "{{system_chain}}" - - -{% if mailer %} -[verif_settings] -type = "Email" - -[verif_settings.contents] -from_address = "{{email_address}}" -email_cooldown = 100 -smtp_url = "{{smtp_url}}" -smtp_domain = "{{smtp_domain}}" -smtp_username = "{{smtp_username}}" -smtp_password = "{{smtp_password}}" -balance_notification_interval = "{{balance_notification_interval}}" -notify_low_balance = "{{notify_low_balance}}" -test = false -test_dir = "" -{% elif phone %} -[verif_settings] -type = "Phone" - -[verif_settings.contents] -auth_api_key = "{{phone_auth_api_key}}" -notification_number = "{{send_number}}" -twillio_account_id = "{{twillio_account_id}}" -twillio_auth_token = "{{twillio_auth_token}}" -operator_notification_number = [] -{% else %} -[verif_settings] -type = "Off" -{% endif %} - +withdraw_chain = "{{system_chain}}" \ No newline at end of file diff --git a/roles/build/defaults/main.yml b/roles/build/defaults/main.yml index 572ae8a2..e1e35388 100644 --- a/roles/build/defaults/main.yml +++ b/roles/build/defaults/main.yml @@ -2,5 +2,5 @@ source_dir: build/ ci: false supported: false copy_images: false -extender: false image_prefix: "" +rita_type: "client" \ No newline at end of file diff --git a/roles/build/tasks/main.yml b/roles/build/tasks/main.yml index 004008f4..b037e4bb 100644 --- a/roles/build/tasks/main.yml +++ b/roles/build/tasks/main.yml @@ -42,14 +42,21 @@ src: "build/bin/targets/{{item}}" dest: "completed-images/{{image_prefix}}{{ansible_date_time.date}}-{{ansible_date_time.hour}}-{{ansible_date_time.minute}}-{{item | basename}}" with_items: "{{image_paths}}" - when: supported and copy_images and not extender + when: supported and copy_images and rita_type == "client" - name: Copy image to staging folder copy: src: "build/bin/targets/{{item}}" - dest: "completed-images/{{ansible_date_time.date}}-{{ansible_date_time.hour}}-{{ansible_date_time.minute}}-extender-{{item | basename}}" + dest: "completed-images/extender-{{ansible_date_time.date}}-{{ansible_date_time.hour}}-{{ansible_date_time.minute}}-{{item | basename}}" with_items: "{{image_paths}}" - when: supported and copy_images and extender + when: supported and copy_images and rita_type == "extender" + + - name: Copy image to staging folder + copy: + src: "build/bin/targets/{{item}}" + dest: "completed-images/{{image_prefix}}exit-{{ansible_date_time.date}}-{{ansible_date_time.hour}}-{{ansible_date_time.minute}}-{{item | basename}}" + with_items: "{{image_paths}}" + when: supported and copy_images and rita_type == "exit" - name: Copy image to archive folder copy: diff --git a/roles/prepare-sources/defaults/main.yml b/roles/prepare-sources/defaults/main.yml index 511f5f37..71668bb8 100644 --- a/roles/prepare-sources/defaults/main.yml +++ b/roles/prepare-sources/defaults/main.yml @@ -1,3 +1,3 @@ repo: https://github.com/openwrt/openwrt -version: v23.05.3 +version: openwrt-23.05 source_dir: build/ diff --git a/scripts/build-all-dev-images.sh b/scripts/build-all-dev-images.sh deleted file mode 100644 index 6645f697..00000000 --- a/scripts/build-all-dev-images.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -eux -cd $(dirname $0)/.. -export SERVER=updates -export HTTP_DIR=/usr/share/nginx/html/ -for file in profiles/devices/* -do - ansible-playbook -e @$file -e @profiles/management/althea-dev.yml -e gateway=true firmware-build.yml -done diff --git a/scripts/build-all-test-images.sh b/scripts/build-all-test-images.sh deleted file mode 100644 index ca2f7454..00000000 --- a/scripts/build-all-test-images.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -eux -cd $(dirname $0)/.. -export SERVER=updates -export HTTP_DIR=/usr/share/nginx/html/ -for file in profiles/devices/* -do - ansible-playbook -e @$file -e @profiles/management/althea-test.yml -e gateway=true firmware-build.yml -done diff --git a/scripts/build-basics.sh b/scripts/build-basics.sh deleted file mode 100644 index 5c8ec2d9..00000000 --- a/scripts/build-basics.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -eux -ansible-playbook -e @profiles/devices/glb1300.yml -e @profiles/management/althea-test.yml build-and-upgrade.yml -ansible-playbook -e @profiles/devices/n600.yml -e @profiles/management/althea-test.yml firmware-build.yml -ansible-playbook -e @profiles/devices/n750.yml -e @profiles/management/althea-test.yml firmware-build.yml -ansible-playbook -e @profiles/devices/x86_64.yml -e @profiles/management/althea-test.yml firmware-build.yml -ansible-playbook -e @profiles/devices/edgerouterx.yml -e @profiles/management/althea-test.yml firmware-build.yml diff --git a/scripts/build-exit-managed.sh b/scripts/build-exit-managed.sh new file mode 100644 index 00000000..77368baa --- /dev/null +++ b/scripts/build-exit-managed.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -eux +cd $(dirname $0)/.. + +# desktops / servers +ansible-playbook -e @profiles/exit/x86_64.yml -e @profiles/management/hawk-managed.yml firmware-build.yml + +ansible-playbook -e @profiles/exit/mikrotik_hap-ac3.yml -e @profiles/management/hawk-managed.yml firmware-build.yml diff --git a/scripts/build-managed-dev.sh b/scripts/build-managed-dev.sh deleted file mode 100644 index cd4ea1b2..00000000 --- a/scripts/build-managed-dev.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -eux -cd $(dirname $0)/.. -export SERVER=updates -export HTTP_DIR=/usr/share/nginx/html/ - -# ramips -ansible-playbook -e @profiles/devices/cudy_wr2100.yml -e @profiles/management/althea-managed.yml firmware-build.yml -ansible-playbook -e @profiles/devices/mikrotik_routerboard-750gr3.yml -e @profiles/management/althea-managed.yml firmware-build.yml - -# rockchip -ansible-playbook -e @profiles/devices/nanopi-r2s.yml -e @profiles/management/althea-managed.yml firmware-build.yml - -# mvebu - -# ipq40xx -ansible-playbook -e @profiles/devices/mikrotik_hap-ac2.yml -e @profiles/management/althea-managed.yml firmware-build.yml - - -# rsync -ahz --delete build/bin/targets $SERVER:$HTTP_DIR/supported diff --git a/scripts/build-packages-and-upload.sh b/scripts/build-packages-and-upload.sh deleted file mode 100644 index fad320b5..00000000 --- a/scripts/build-packages-and-upload.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# builds packages and uploads them to a folder called rc (release candidate) on the updates server you can then move this rc folder to a folder named after the appropriate release -set -ux -cd $(dirname $0)/.. -export SERVER=updates -export HTTP_DIR=/usr/share/nginx/html/ -for file in profiles/devices/* -do - ansible-playbook -e @$file -e @profiles/management/althea-packages.yml firmware-build.yml -done - -rsync -ahz --delete build/bin/packages $SERVER:$HTTP_DIR/rc/ -rsync -ahz --delete build/bin/targets $SERVER:$HTTP_DIR/ diff --git a/scripts/build-x86-pkgs-and-upload.sh b/scripts/build-x86-pkgs-and-upload.sh deleted file mode 100644 index d5a41b02..00000000 --- a/scripts/build-x86-pkgs-and-upload.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -ux -cd $(dirname $0)/.. -export SERVER=updates -export HTTP_DIR=/usr/share/nginx/html/ - -ansible-playbook -e @profiles/devices/x86_64.yml -e @profiles/management/althea-release.yml firmware-build.yml - -rsync -ahz --delete build/bin/packages $SERVER:$HTTP_DIR/rc/ -rsync -ahz --delete build/bin/targets $SERVER:$HTTP_DIR/ diff --git a/scripts/upload-rc.sh b/scripts/upload-rc.sh index f545e3da..7d4ae31a 100644 --- a/scripts/upload-rc.sh +++ b/scripts/upload-rc.sh @@ -4,4 +4,7 @@ cd $(dirname $0)/.. export SERVER=updates export HTTP_DIR=/usr/share/nginx/html/ +# run this after running either build managed or build default release with a package +# signing key in the folder + rsync -ahz --delete build/bin/packages $SERVER:$HTTP_DIR/rc/