Compare commits
No commits in common. "aacdd094f3c42c9ee92efba6d99e59991471ff00" and "c3e90fe0b21171976d7e3beabc3cc23abd3532d3" have entirely different histories.
aacdd094f3
...
c3e90fe0b2
|
@ -1,16 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
function get_id() {
|
#=======================================================================================================
|
||||||
S=$($1)
|
# Import Cadoles seed
|
||||||
V=$(echo $S|jq -r .session_id)
|
#=======================================================================================================
|
||||||
if [ $? = 0 ]; then
|
|
||||||
echo $V
|
cucchiaiata-cli v1.setting.source.create --source_name Cadoles --source_directory /usr/share/risotto/seed/cadoles
|
||||||
else
|
|
||||||
echo $S
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#=======================================================================================================
|
#=======================================================================================================
|
||||||
# Infrastructure
|
# Infrastructure
|
||||||
|
@ -33,12 +28,12 @@ cucchiaiata-cli v1.user.role.create --user_login gnunux \
|
||||||
# +~~~~~~~~~~+
|
# +~~~~~~~~~~+
|
||||||
cucchiaiata-cli v1.infra.zone.create --zone_name internet
|
cucchiaiata-cli v1.infra.zone.create --zone_name internet
|
||||||
# zone configuration
|
# zone configuration
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.zone.start --zone_name internet")
|
S=$(cucchiaiata-cli v1.setting.session.zone.start --zone_name internet | jq -r .session_id)
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.network "192.168.1.0/24" \
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.network.network "192.168.1.0/24" \
|
||||||
--configuration.host_start "192.168.1.10" \
|
--configuration.network.host_start "192.168.1.10" \
|
||||||
--configuration.host_stop "192.168.1.100" \
|
--configuration.network.host_end "192.168.1.100" \
|
||||||
--configuration.dns 192.168.1.2 \
|
--configuration.network.dns 192.168.1.2 \
|
||||||
--configuration.gateway 192.168.1.254
|
--configuration.network.gateway 192.168.1.254
|
||||||
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
|
||||||
|
@ -52,12 +47,11 @@ cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
# +---------------------------+
|
# +---------------------------+
|
||||||
cucchiaiata-cli v1.infra.cluster.create --cluster_name cluster.cadoles.com \
|
cucchiaiata-cli v1.infra.cluster.create --cluster_name cluster.cadoles.com \
|
||||||
--zone_name internet
|
--zone_name internet
|
||||||
cucchiaiata-cli v1.infra.cluster.node.create --node_name node1.cadoles.com \
|
cucchiaiata-cli v1.infra.cluster.node.create --server_name node1.cadoles.com \
|
||||||
--cluster_name cluster.cadoles.com \
|
|
||||||
--zones_name internet
|
--zones_name internet
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.cluster.start --cluster_name cluster.cadoles.com")
|
S=$(cucchiaiata-cli v1.setting.session.cluster.start --cluster_name cluster.cadoles.com | jq -r .session_id)
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.network.virtual_ip "192.168.1.1"
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.network.virtual_ip "192.168.1.1"
|
||||||
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
@ -99,14 +93,14 @@ cucchiaiata-cli v1.setting.servermodel.create --servermodel_name unbound_etab1 -
|
||||||
# configuration
|
# configuration
|
||||||
|
|
||||||
# Servermodel ACA
|
# Servermodel ACA
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name aca")
|
S=$(cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name aca| jq -r .session_id)
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.serveur_ssh.ssh_allow_networks admin.cadoles.com
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.serveur_ssh.ssh_allow_networks admin.cadoles.com
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
|
||||||
# Servermodel unbound
|
# Servermodel unbound
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name unbound")
|
S=$(cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name unbound| jq -r .session_id)
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.serveur_dns.unbound_local_zones cadoles.com \
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.serveur_dns.unbound_local_zones cadoles.com \
|
||||||
--configuration.reseau.unbound_route_address 192.168.1.254 \
|
--configuration.reseau.unbound_route_address 192.168.1.2 \
|
||||||
--configuration.serveur_dns.unbound_allowed_client_cidr 192.168.1.0/24
|
--configuration.serveur_dns.unbound_allowed_client_cidr 192.168.1.0/24
|
||||||
cucchiaiata-cli v1.setting.session.filter --session_id "$S" --namespace unbound
|
cucchiaiata-cli v1.setting.session.filter --session_id "$S" --namespace unbound
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --unbound.unbound_zone_cadoles_com.hostname_cadoles_com.hostname_cadoles_com toto titi \
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --unbound.unbound_zone_cadoles_com.hostname_cadoles_com.hostname_cadoles_com toto titi \
|
||||||
|
@ -116,7 +110,7 @@ cucchiaiata-cli v1.setting.session.configure --session_id "$S" --unbound.unbound
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
|
||||||
# Servermodel unbound_etab1
|
# Servermodel unbound_etab1
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name unbound_etab1")
|
S=$(cucchiaiata-cli v1.setting.session.servermodel.start --servermodel_name unbound_etab1 | jq -r .session_id)
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.reseau.unbound_domain_name dns.cadoles.com
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.reseau.unbound_domain_name dns.cadoles.com
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
|
||||||
|
@ -135,13 +129,12 @@ cucchiaiata-cli v1.infra.server.create --server_name dns.cadoles.com \
|
||||||
--zones_name internet \
|
--zones_name internet \
|
||||||
--servermodel_name unbound_etab1
|
--servermodel_name unbound_etab1
|
||||||
# configuration
|
# configuration
|
||||||
sleep 1
|
S=$(cucchiaiata-cli v1.setting.session.server.start --server dns.cadoles.com | jq -r .session_id)
|
||||||
S=$(get_id "cucchiaiata-cli v1.setting.session.server.start --server dns.cadoles.com")
|
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.reseau.unbound_ip_address_cidr 192.168.1.2/24
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --configuration.reseau.unbound_ip_address_cidr 192.168.1.2/24
|
||||||
cucchiaiata-cli v1.setting.session.filter --session_id "$S" --namespace opennebula
|
cucchiaiata-cli v1.setting.session.filter --session_id "$S" --namespace opennebula
|
||||||
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --opennebula.cpu 0.2 \
|
cucchiaiata-cli v1.setting.session.configure --session_id "$S" --opennebula.configuration.cpu 0.2 \
|
||||||
--opennebula.vcpu 2 \
|
--opennebula.configuration.vcpu 2 \
|
||||||
--opennebula.memory 2
|
--opennebula.configuration.memory 2
|
||||||
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
cucchiaiata-cli v1.setting.session.validate --session_id $S
|
||||||
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
cucchiaiata-cli v1.setting.session.stop --session_id "$S" --save
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,8 @@ class Configuration(Common):
|
||||||
def get(self):
|
def get(self):
|
||||||
parameters = self.get_parameters()
|
parameters = self.get_parameters()
|
||||||
tiramisu_config = self.configure_server()
|
tiramisu_config = self.configure_server()
|
||||||
option = next(tiramisu_config.option.list('all'))
|
|
||||||
namespace = option.option.path().split('.', 1)[0]
|
|
||||||
parser = TiramisuCmdlineParser(tiramisu_config,
|
parser = TiramisuCmdlineParser(tiramisu_config,
|
||||||
self.prog,
|
self.prog,
|
||||||
root=namespace,
|
|
||||||
unrestraint=True,
|
unrestraint=True,
|
||||||
fullpath=True)
|
fullpath=True)
|
||||||
parser.parse_args(parameters,
|
parser.parse_args(parameters,
|
||||||
|
|
Loading…
Reference in New Issue