此内容没有您所选择的语言版本。

10.3. S-RAMP Management CLI


10.3.1. Connect to the S-RAMP Server

Connecting to the S-RAMP server gives you access to the S-RAMP dashboard and repository. This allows you to access artifacts and their metadata in one place. Once you have signed in, you can browse the repository and inspect your data.
  1. Open a command terminal and navigate to EAP_HOME/bin directory.
  2. Start the JBoss EAP server by entering following command:
    $ ./standalone.sh
  3. Open another terminal and type ./s-ramp.sh. Then type connect and press Tab key. The command will auto-complete to say s-ramp:connect http://localhost:8080/s-ramp-server.
    Enter username and password to connect via the S-RAMP shell. The username and password are defined in sramp.properties.

Result

When you press Tab key, the command will auto-complete to say s-ramp:connect http://localhost:8080/s-ramp-server and when you press the return key the cursor will go from red to green indicating successful connection to S-ramp server.

10.3.2. Browse the S-RAMP Repository

Running the commands in this task will allow you to access the S-RAMP repository and peruse its contents. You can view server output and metadata for artifacts. This lets you view additional details of indexed items.
  1. Start the S-RAMP Management CLI.
    ./s-ramp.sh
  2. Connect to S-RAMP server.
    s-ramp:connect http://localhost:8080/s-ramp-server
  3. Upload an artifact to the repository.
    s-ramp:uploadArtifact /path/to/overlord.demo.SimpleReleaseProcess.bpmn
  4. Browse the s-ramp repository.
    s-ramp:query /s-ramp
    Here is an example of the output of this command:
    Querying the S-RAMP repository:
        /s-ramp
    Atom Feed (9 entries)
      Idx                    Type Name
      ---                    ---- ----
        1           ImageDocument user-properties.png
        2                Document overlord.demo.CheckDeployment-taskform.flt
        3         BrmsPkgDocument SRAMPPackage.pkg
        4           ImageDocument overlord.demo.SimpleReleaseProcess-image.png
        5           ImageDocument run-build-install.png
        6                Document overlord.demo.SimpleReleaseProcess-taskform.flt
        7           ImageDocument audio-input-microphone-3.png
        8            BpmnDocument overlord.demo.SimpleReleaseProcess.bpmn
        9            TextDocument HttpClientWorkDefinitions.wid
    
  5. Get metadata. To obtain the metaData of overlord.demo.SimpleReleaseProcess.bpmn (which is number 8 in the list in the output example), run the following command:
    getMetaData --feed 8
    The output of the command is:
    Meta Data for: 31b3acbc-cda8-4856-9e34-d3e645283035
    --------------
      -- Core S-RAMP Info --
      Type: BpmnDocument
      Model: ext
      UUID: 31b3acbc-cda8-4856-9e34-d3e645283035
      Name: overlord.demo.SimpleReleaseProcess.bpmn
      Derived: false
      Created By: anonymous
      Created On: 2013-03-08T14:00:37.036-05:00
      Modified By: anonymous
      Modified On: 2013-03-18T14:58:46.328-04:00
    s-ramp>
    
    You can also use the UUID of the artifact to obtain the metadata.
    getMetaData --uuid 31b3acbc-cda8-4856-9e34-d3e645283035
  6. Set property. To set the core property, use command property set name _overlord.demo.SimpleReleaseProcess.bpmn_. To set custom property, use property set cliProp "this is an important document"
  7. To add a comment to the artifact file, run command:
    addComment "Comment added to the file"
  8. Once the changes are completed use updateMetaData to push the changes.
  9. Run the s-ramp query with Property.
    query /s-ramp[@cliProp]
    1, 31b3acbc-cda8-4856-9e34-d3e645283035, BpmnDocument, _overlord.demo.SimpleReleaseProcess.bpmn_
    
  10. Download the artifact.
    getContent --uuid 31b3acbc-cda8-4856-9e34-d3e645283035 --outputFile downloaded-overlord.demo.SimpleReleaseProcess.bpmn
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部