diff --git a/bin/prep_bubble_jar b/bin/prep_bubble_jar index 1b14bf0f..1c8b1345 100755 --- a/bin/prep_bubble_jar +++ b/bin/prep_bubble_jar @@ -84,6 +84,8 @@ echo "------------------------------------------------------------" cat "${UPDATED}" echo "------------------------------------------------------------" +cd ${LOCALSTORAGE_BASE_DIR} && jar uvf ${BUBBLE_JAR} automation || die "Error updating ${BUBBLE_JAR} with default role archives" + mkdir -p ${CLASSES_DIR}/scripts for script in run.sh bubble_common bubble bget bgetn bgeti bpost bposte bput bpute bdelete bscript bmodel bencrypt bdecrypt list_bubble_databases cleanup_bubble_databases ; do cp ${SCRIPT_DIR}/${script} ${CLASSES_DIR}/scripts || die "Error copying ${SCRIPT_DIR}/${script} -> ${CLASSES_DIR}/scripts" diff --git a/bin/reset_bubble_db b/bin/reset_bubble_db index b9925645..1e8620dd 100755 --- a/bin/reset_bubble_db +++ b/bin/reset_bubble_db @@ -43,5 +43,5 @@ else fi dropdb bubble ; createdb bubble && cat ${SQL_DIR}/bubble.sql | psql bubble -echo "Successfully initialized DB schema from:" +echo "Successfully initialized DB schema from: " echo ${SQL_DIR}/bubble.sql diff --git a/bubble-server/src/main/java/bubble/ApiConstants.java b/bubble-server/src/main/java/bubble/ApiConstants.java index a7364198..0a9568df 100644 --- a/bubble-server/src/main/java/bubble/ApiConstants.java +++ b/bubble-server/src/main/java/bubble/ApiConstants.java @@ -33,6 +33,8 @@ public class ApiConstants { public static final int MAX_SEARCH_PAGE = 50; + public static final String ROOT_NETWORK_UUID = "00000000-0000-0000-0000-000000000000"; + @Getter(lazy=true) private static final String bubbleDefaultDomain = initDefaultDomain(); private static String initDefaultDomain() { final File f = new File(HOME_DIR, ".BUBBLE_DEFAULT_DOMAIN"); diff --git a/bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java b/bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java index a8b3e85f..d8f7e12f 100644 --- a/bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java +++ b/bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java @@ -2,6 +2,7 @@ package bubble.cloud.storage.local; import bubble.cloud.CloudServiceDriverBase; import bubble.cloud.storage.StorageServiceDriver; +import bubble.dao.account.AccountDAO; import bubble.dao.cloud.BubbleNodeDAO; import bubble.model.cloud.BubbleNetwork; import bubble.model.cloud.BubbleNode; @@ -12,7 +13,6 @@ import lombok.Cleanup; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.cobbzilla.util.io.FileUtil; -import org.cobbzilla.wizard.cache.redis.RedisService; import org.springframework.beans.factory.annotation.Autowired; import java.io.*; @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import static bubble.ApiConstants.ROOT_NETWORK_UUID; import static org.cobbzilla.util.daemon.ZillaRuntime.die; import static org.cobbzilla.util.daemon.ZillaRuntime.notSupported; import static org.cobbzilla.util.io.FileUtil.*; @@ -32,7 +33,7 @@ public class LocalStorageDriver extends CloudServiceDriverBase ref = new AtomicReference<>(); - try { - background(() -> { - IdentifiableBase.getEnforceNullUuidOnCreate().set(false); - ref.set(networkDAO.create(network)); - }, - ref::set).join(ROOT_CREATE_TIMEOUT); - } catch (InterruptedException e) { - return die("createRoot: interrupted: "+e); - } - final Object o = ref.get(); - if (o instanceof BubbleNetwork) return (BubbleNetwork) o; - if (o instanceof Exception) return die((Exception) o); - return die("createRoot: ref was unset"); + network.setUuid(ApiConstants.ROOT_NETWORK_UUID); + return networkDAO.create(network); } } diff --git a/bubble-server/src/main/java/bubble/service/cloud/StandardStorageService.java b/bubble-server/src/main/java/bubble/service/cloud/StandardStorageService.java index a4e8f2d5..8dd0ed13 100644 --- a/bubble-server/src/main/java/bubble/service/cloud/StandardStorageService.java +++ b/bubble-server/src/main/java/bubble/service/cloud/StandardStorageService.java @@ -40,7 +40,7 @@ public class StandardStorageService implements StorageService { } } - private String thisNodeId() { return configuration.getThisNode().getUuid(); } + private String thisNodeId() { return configuration.getThisNode() != null ? configuration.getThisNode().getUuid() : null; } public boolean exists(String account, String uri) { final StorageTarget target = new StorageTarget(account, uri); diff --git a/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties b/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties index efcae96a..f35b5a62 100644 --- a/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties +++ b/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties @@ -8,6 +8,7 @@ message_false=False message_null=null message_undefined=undefined +err.activationRequest.required=Activation request object is required err.name.required=Name is required err.name.tooShort=Name must be at least 4 characters err.name.tooLong=Name cannot be longer than 100 characters @@ -37,6 +38,8 @@ err.accountInit.timeout=Timeout initializing new account # Activation form form_title_activation=Activate Bubble field_label_description=Description +field_label_domain=Domain Name +field_label_domain_description=Enter a domain that is managed by this DNS service. Bubbles will be launched within this domain. field_label_network_name=Network Name field_label_dns_service=DNS Service field_label_storage_service=Storage Service @@ -167,7 +170,7 @@ driver_credential_AWS_SECRET_KEY_bubble.cloud.storage.s3.S3StorageDriver=AWS Sec driver_config_region_bubble.cloud.storage.s3.S3StorageDriver=AWS Region driver_config_description_region_bubble.cloud.storage.s3.S3StorageDriver=The AWS Region to use. Must be a valid name in the AWS Regions enum class. driver_config_bucket_bubble.cloud.storage.s3.S3StorageDriver=S3 Bucket Name -driver_config_description_bucket_bubble.cloud.storage.s3.S3StorageDriver=The name of the S3 bucket to use. The credentials provided in AWS Access Key and AWS Secret key must have permissions to read, write, and list objects in this bucket. +driver_config_description_bucket_bubble.cloud.storage.s3.S3StorageDriver=The name of the S3 bucket to use. The credentials provided in AWS Access Key and AWS Secret key must have permissions to read, write, and list objects in this bucket. If the bucket does not exist, it will be created -- in this case the credentials must also have permissions to create new buckets. driver_config_prefix_bubble.cloud.storage.s3.S3StorageDriver=S3 Bucket Prefix driver_config_description_prefix_bubble.cloud.storage.s3.S3StorageDriver=The bucket prefix (subdirectory) to use. All objects stored in S3 will be put under this prefix. This allows you to use the same S3 Bucket for multiple Bubbles, as long as they each use a distinct prefix. driver_config_listFetchSize_bubble.cloud.storage.s3.S3StorageDriver=S3 List Fetch Size diff --git a/bubble-web b/bubble-web index 6c141907..3eab9042 160000 --- a/bubble-web +++ b/bubble-web @@ -1 +1 @@ -Subproject commit 6c141907a646db2d5357bff3607391a23407de8c +Subproject commit 3eab904291f158ab130c549a2bdd15bb77f0ec03