Transition Objects from Buckit to GCS
The procedure on this page creates a new object lifecycle management rule that transition objects from a Buckit bucket to a remote storage tier on the Google Cloud Storage backend. This procedure supports use cases like moving aged data to low-cost public cloud storage solutions after a certain time period or calendar date.
Requirements
Install and Configure bm
This procedure uses bm for performing operations on the Buckit cluster.
Install bm on a machine with network access to both source and destination
clusters. See the bm Installation Quickstart for
instructions on downloading and installing bm.
Use the bm alias set command to create an alias for the source Buckit cluster.
Alias creation requires specifying an access key for a user on the source and
destination clusters. The specified users must have permissions for configuring and
applying transition operations.
Required Buckit Permissions
Buckit requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.
Buckit also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:
For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"admin:SetTier",
"admin:ListTier"
],
"Effect": "Allow",
"Sid": "EnableRemoteTierManagement"
},
{
"Action": [
"s3:PutLifecycleConfiguration",
"s3:GetLifecycleConfiguration"
],
"Resource": [
"arn:aws:s3:::*"
],
"Effect": "Allow",
"Sid": "EnableLifecycleManagementRules"
}
]
}
Required GCS Permissions
Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, Buckit requires the GCS credentials provide read, write, list, and delete permissions for the remote bucket.
Refer to the GCS IAM permissions documentation for more complete guidance on configuring the required permissions.
Remote Bucket Must Exist
Create the remote GCS bucket prior to configuring lifecycle management tiers or rules using that bucket as the target.
If you set a default GCS storage class, Buckit uses that default if you do not specify a storage class when defining the remote tier.
Ensure you document the settings of both your GCS bucket and Buckit tiering configuration to avoid any potential confusion, misconfiguration, or other unexpected outcomes.
Considerations
Lifecycle Management Object Scanner
Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.
Exclusive Access to Remote Data
Buckit requires exclusive access to the transitioned data on the remote storage tier. Object metadata on the “hot” Buckit source is strongly linked to the object data on the “warm/cold” remote tier. Buckit cannot retrieve object data without access to the remote, nor can the remote be used to restore lost metadata on the source.
All access to the transitioned objects must occur through Buckit via S3 API operations only. Manually modifying a transitioned object - whether the metadata on the “hot” Buckit tier or the object data on the remote “warm/cold” tier - may result in loss of that object data.
Buckit ignores any objects in the remote bucket or bucket prefix not explicitly managed by the Buckit deployment. Automatic transition and transparent object retrieval depend on the following assumptions:
No external mutation, migration, or deletion of objects on the remote storage.
No lifecycle management rules (e.g. transition or expiration) on the remote storage bucket.
Buckit stores all transitioned objects in the remote storage bucket or resource under a unique per-deployment prefix value. This value is not intended to support identifying the source deployment from the backend. Buckit supports an additional optional human-readable prefix when configuring the remote target, which may facilitate operations related to diagnostics, maintenance, or disaster recovery.
Buckit recommends specifying this optional prefix for remote storage tiers which contain other data, including transitioned objects from other Buckit deployments. This tutorial includes the necessary syntax for setting this prefix.
Availability of Remote Data
Buckit tiering behavior depends on the remote storage returning objects immediately (milliseconds to seconds) upon request. Buckit therefore cannot support remote storage which requires rehydration, wait periods, or manual intervention.
Buckit creates metadata for each transitioned object that identifies its location on the remote storage. Applications cannot trivially identify and access a transitioned object independent of Buckit. Availability of the transitioned data therefore depends on the same core protections that erasure coding and distributed deployment topologies provide for all objects on the Buckit deployment. Using object transition does not provide any additional business continuity or disaster recovery benefits.
Workloads that require BC/DR protections should implement Buckit Server-Side replication. Replication ensures objects remains preserved on the remote replication site, such that you can resynchronize from the remote in the event of partial or total data loss. See Resynchronization (Disaster Recovery) for more complete documentation on using replication to recover after partial or total data loss.
Procedure
1) Configure User Accounts and Policies for Lifecycle Management
This step creates users and policies on the Buckit deployment for supporting lifecycle management operations. You can skip this step if the deployment already has users with the necessary permissions.
The following example uses Alpha as a placeholder alias for
the Buckit deployment. Replace this value with the appropriate alias for the
Buckit deployment on which you are configuring lifecycle management rules.
Replace the password LongRandomSecretKey with a long, random, and secure
secret key as per your organizations best practices for password generation.
cat > /tmp/LifecycleManagementAdmin.json <<'EOF'
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"admin:SetTier",
"admin:ListTier"
],
"Effect": "Allow",
"Sid": "EnableRemoteTierManagement"
},
{
"Action": [
"s3:PutLifecycleConfiguration",
"s3:GetLifecycleConfiguration"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::*"
],
"Sid": "EnableLifecycleRuleManagement"
}
]
}
EOF
bm admin policy create Alpha LifecycleAdminPolicy /tmp/LifecycleManagementAdmin.json
bm admin user add Alpha alphaLifecycleAdmin LongRandomSecretKey
bm admin policy attach Alpha LifecycleAdminPolicy --user=alphaLifecycleAdmin
This example assumes that the specified aliases have the necessary permissions for creating policies and users on the deployment. See User Management and Buckit Policy Based Access Control for more complete documentation on Buckit users and policies respectively.
2) Configure the Remote Storage Tier
Use the bm ilm tier add command to add a new Google Cloud Storage
service as the remote storage tier:
bm ilm tier add gcs TARGET TIER_NAME \
--bucket BUCKET \
--prefix PREFIX \
--credentials-file CREDENTIALS \
--storage-class STORAGE_CLASS
The example above uses the following arguments:
Argument |
Description |
|---|---|
The |
|
The name to associate with the new GCS
remote storage tier. Specify the name in all-caps, e.g. |
|
The name of the bucket on the GCS storage backend to which Buckit transitions objects. |
|
The optional bucket prefix within which Buckit transitions objects. Buckit stores all transitioned objects in the specified Buckit recommends specifying this optional prefix for remote storage tiers which contain other data, including transitioned objects from other Buckit deployments. This prefix should provide a clear reference back to the source Buckit deployment to facilitate ease of operations related to diagnostics, maintenance, or disaster recovery. |
|
The credential file for a user on the remote GCS tier. The specified user credentials must correspond to a GCS user with the required permissions. |
|
The GCS storage class Buckit applies to objects transitioned to the GCS bucket. Buckit tiering behavior depends on the remote storage returning objects immediately (milliseconds to seconds) upon request. Buckit therefore cannot support remote storage which requires rehydration, wait periods, or manual intervention. The following GCS storage classes meet Buckit’s requirements as a remote tier:
For more information, see GCS storage class. |
3) Create and Apply the Transition Rule
Use the bm ilm rule add command to create a new transition rule
for the bucket. The following example configures transition after the
specified number of calendar days:
bm ilm rule add ALIAS/BUCKET \
--transition-tier TIERNAME \
--transition-days DAYS \
--noncurrent-transition-days NONCURRENT_DAYS
--noncurrent-transition-tier TIERNAME
The example above specifies the following arguments:
Argument |
Description |
|---|---|
Specify the |
|
Specify the full path to the bucket for which you are creating the lifecycle management rule. |
|
The remote storage tier to which Buckit transitions objects. Specify the remote storage tier name created in the previous step. If you want to transition noncurrent object versions to a distinct
remote tier, specify a different tier name for
|
|
The number of calendar days after which Buckit marks an object as
eligible for transition. Specify the number of days as an integer,
e.g. |
|
The number of calendar days after which Buckit marks a noncurrent
object version as eligible for transition. Buckit specifically measures
the time since an object became non-current instead of the object
creation time. Specify the number of days as an integer,
e.g. Omit this value to ignore noncurrent object versions. This option has no effect on non-versioned buckets. |
4) Verify the Transition Rule
Use the bm ilm rule ls command to review the configured transition
rules:
bm ilm rule ls ALIAS/PATH --transition