You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2018/06/20 14:31:05 UTC

[GitHub] brooklyn-docs pull request #258: Fix copy-state usage for brooklyn-karaf

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-docs/pull/258

    Fix copy-state usage for brooklyn-karaf

    In brooklyn classic, one could run `brooklyn copy-state ...`. This is not supported in brooklyn karaf.
    
    Instead, the REST api can be used. This PR updates the docs to show how to use it.
    
    Please first review/merge https://github.com/apache/brooklyn-server/pull/972, to fix this REST api for usage in karaf!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-docs fix-copy-state

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-docs/pull/258.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #258
    
----

----


---

[GitHub] brooklyn-docs pull request #258: Fix copy-state usage for brooklyn-karaf

Posted by nakomis <gi...@git.apache.org>.
Github user nakomis commented on a diff in the pull request:

    https://github.com/apache/brooklyn-docs/pull/258#discussion_r197133399
  
    --- Diff: guide/ops/persistence/index.md ---
    @@ -246,16 +246,16 @@ The state can be downloaded periodically from the object store, archived and bac
     An example script to be invoked by CRON is shown below:
     
         DATE=`date "+%Y%m%d.%H%M.%S"`
    -    BACKUP_FILENAME=/path/to/archives/back-${DATE}.tar.gz
    -    TEMP_DATA_DIR=/path/to/tempdir
    -    
    -    brooklyn copy-state \
    -            --persistenceLocation named:my-persistence-location \
    -            --persistenceDir /path/to/bucket \
    -            --destinationDir $TEMP_DATA_DIR
    +    BACKUP_FILENAME=/path/to/archives/back-${DATE}.zip
    +    HOSTNAME=localhost
    +    USERNAME=admin
    +    PASSWORD=pa55wOrd
    +
    +    curl -v -u "${USERNAME}:${PASSWORD}" \
    +            https://${HOSTNAME}:8443/v1/server/ha/persist/export \
    +            > ${BACKUP_FILENAME}
     
    -    tar --exclude '*/backups/*' -czvf $BACKUP_FILENAME $TEMP_DATA_DIR
         # For s3cmd installation see http://s3tools.org/repositories
    --- End diff --
    
    I know it's not directly related to this PR, but we should switch to recommending the official AWS CLI now that it's mature and stable:
    
    ```
    # For AWS CLI installation see https://aws.amazon.com/cli
    aws s3 cp $BACKUP_FILENAME s3://mybackupbucket
    rm $BACKUP_FILENAME
    ```


---

[GitHub] brooklyn-docs pull request #258: Fix copy-state usage for brooklyn-karaf

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-docs/pull/258


---

[GitHub] brooklyn-docs pull request #258: Fix copy-state usage for brooklyn-karaf

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-docs/pull/258#discussion_r197136971
  
    --- Diff: guide/ops/persistence/index.md ---
    @@ -246,16 +246,16 @@ The state can be downloaded periodically from the object store, archived and bac
     An example script to be invoked by CRON is shown below:
     
         DATE=`date "+%Y%m%d.%H%M.%S"`
    -    BACKUP_FILENAME=/path/to/archives/back-${DATE}.tar.gz
    -    TEMP_DATA_DIR=/path/to/tempdir
    -    
    -    brooklyn copy-state \
    -            --persistenceLocation named:my-persistence-location \
    -            --persistenceDir /path/to/bucket \
    -            --destinationDir $TEMP_DATA_DIR
    +    BACKUP_FILENAME=/path/to/archives/back-${DATE}.zip
    +    HOSTNAME=localhost
    +    USERNAME=admin
    +    PASSWORD=pa55wOrd
    +
    +    curl -v -u "${USERNAME}:${PASSWORD}" \
    +            https://${HOSTNAME}:8443/v1/server/ha/persist/export \
    +            > ${BACKUP_FILENAME}
     
    -    tar --exclude '*/backups/*' -czvf $BACKUP_FILENAME $TEMP_DATA_DIR
         # For s3cmd installation see http://s3tools.org/repositories
    --- End diff --
    
    @nakomis I opened a PR for this: https://github.com/apache/brooklyn-docs/pull/260


---

[GitHub] brooklyn-docs issue #258: Fix copy-state usage for brooklyn-karaf

Posted by nakomis <gi...@git.apache.org>.
Github user nakomis commented on the issue:

    https://github.com/apache/brooklyn-docs/pull/258
  
    One minor comment, other than that LGTM


---