Version 10 (modified by carlos, 6 years ago) (diff) |
---|
EGI FedCloud
Se recomienda la lectura la guía de usuario antes de realizacizar de las prácticas.
https://appdb.egi.eu/store/vappliance/egi.ubuntu.14.04
[user@ui ~]$ ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2GroupID=grid,o=glue "GLUE2ServiceType=IaaS" | grep GLUE2ServiceAdminDomainForeignKey | awk {'print $2'}
[user@ui ~]$ ldapsearch -x -H ldap://lcg-bdii.cern.ch:2170 -b GLUE2DomainID=CESNET-MetaCloud,GLUE2GroupID=grid,o=glue GLUE2EndpointInterfaceName=OCCI | grep GLUE2EndpointURL | awk {'print $2'}
[user@ui ~]$ ssh-keygen -t rsa -b 2048 -f tmpfedcloud
[user@ui ~]$cat > tmpfedcloud.login << EOF #cloud-config users: - name: cloudadm sudo: ALL=(ALL) NOPASSWD:ALL lock-passwd: true ssh-import-id: cloudadm ssh-authorized-keys: - `cat tmpfedcloud.pub` EOF
[user@ui ~]$ export ENDPOINT=https://carach5.ics.muni.cz:11443 [user@ui ~]$ export OS_TPL=http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_egi_ubuntu_server_14_04_lts_fedcloud_warg_131 [user@ui ~]$ export RES_TPL=http://fedcloud.egi.eu/occi/compute/flavour/1.0#small
[user@ui ~]$ VM_ID=$(occi --endpoint $ENDPOINT --auth x509 --user-cred $X509_USER_PROXY --voms --action create --resource compute --attribute occi.core.title="MyFirstVM1" --mixin $OS_TPL --mixin $RES_TPL --context user_data="file://$PWD/tmpfedcloud.login") [user@ui ~]$ occi --endpoint $ENDPOINT --auth x509 --user-cred $X509_USER_PROXY --voms --action describe --resource ${VM_ID}
[user@ui ~]$ ssh -i tmpfedcloud cloudadm@${IP}
[user@ui ~]$ occi --endpoint $ENDPOINT --auth x509 --user-cred $X509_USER_PROXY --voms --action delete --resource ${VM_ID}