package Net::FullAuto::Cloud::fa_local; ### OPEN SOURCE LICENSE - GNU AFFERO PUBLIC LICENSE Version 3.0 ####### # # Net::FullAuto - Distributed Workload Automation Software # Copyright © 2000-2024 Brian M. Kelly # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 of # the License, or any later version. # # This program is distributed in the hope that it will be useful, # but **WITHOUT ANY WARRANTY**; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public # License along with this program. If not, see: # . # ####################################################################### our $VERSION='0.01'; use 5.005; use strict; use warnings; use Data::Dump::Streamer; use JSON::XS; use Module::Load::Conditional qw[can_load]; use Net::FullAuto::Cloud::fa_amazon; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(iset); my $result=sub { my $iset_choice=']P[{choose_iset_setup}'; $iset_choice=~s/^["]//; $iset_choice=~s/["]$//; my $iset=$Net::FullAuto::ISets->{$iset_choice}; $Net::FullAuto::ISets->{selected_iset}=$iset_choice; my $result=$Net::FullAuto::ISets->{$iset_choice}->[1]."select_". lc($Net::FullAuto::ISets->{$iset_choice}->[2]). "_setup"; eval "\$result=$result"; return $result->(); }; my $get_isets=sub { my $test_aws='wget --timeout=5 --tries=1 -qO- '. 'http://169.254.169.254/latest/dynamic/instance-identity/'; $test_aws=`$test_aws`; if (-1{'CLIPBUCKET.com'}->[0]=[]; my $out=`which aws 2>&1`; if (!(-e "/usr/bin/aws") && (-1(); } } print "\n"; my ($output,$error)=('',''); my $choose_iset_banner=<<'END'; ___ _ / __| |_ ___ ___ ___ ___ __ _ _ _ | (__| ' \/ _ \/ _ (_- 'choose_iset_setup', Item_1 => { Text => ']C[', Convey => [keys %{$dirtree}], Result => $result, }, Scroll => 1, Banner => $choose_iset_banner, ); return \%choose_iset_setup; }; sub iset { my $iset=$_[0]||''; my $cwd=Cwd::cwd(); my $banner=<<'END'; ___ _ _ _ _ _ _ _ _ _ | __| _| | | /_\ _ _| |_ | | | ___ __ __ _| | || |___ __| |_ | _| || | | |/ _ \ || | _/ | \ | |__/ _ \/ _/ _` | | __ / _ (_-< _| |_| \_,_|_|_/_/ \_\_,_|\__\___/c ON |____\___/\__\__,_|_|_||_\___/__/\__| You are fully authenticated with FullAuto on LocalHost. The goal now is to use FullAuto to fully automate the setup, processing and maintenance of cloud computing. END my %welcome_fa_amazon=( Name => 'welcome_fa_amazon', Banner => $banner, Result => $get_isets, ); Net::FullAuto::FA_Core::Menu(\%welcome_fa_amazon); Net::FullAuto::FA_Core::cleanup(); } 1