Giter VIP home page Giter VIP logo

dcos-core-cli's Introduction

DC/OS - The Datacenter Operating System

The easiest way to run microservices, big data, and containers in production.

DC/OS End of Life

Support for DC/OS ends on October 31, 2021. We will continue to provide support for our current DC/OS customers per their contracts, of course. However, we will no longer be investing in new features or capabilities or maintaining the related repositories. If a customer wishes to continue use of the DC/OS Enterprise platform or other non-free DC/OS components, the customer can purchase an End-of-Life License or Perpetual Use License, however support is not included in these licenses and continued use of DC/OS will be at your own discretion and risk.

We want to thank all of our loyal customers, particularly those DC/OS users who were fellow pioneers in the growth of the cloud native landscape from the beginning.

What is DC/OS?

Like traditional operating systems, DC/OS is system software that manages computer hardware and software resources and provides common services for computer programs.

Unlike traditional operating systems, DC/OS spans multiple machines within a network, aggregating their resources to maximize utilization by distributed applications.

To learn more, see the DC/OS Overview.

How Do I...?

Releases

DC/OS releases are publicly available on http://dcos.io/releases/

Release artifacts are managed by Mesosphere on Amazon S3, using a CloudFront cache.

To find the git SHA of any given release, check the latest commit in the versioned branches on GitHub: https://github.com/dcos/dcos/branches/

Release Type URL Pattern
Latest Stable https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh
Latest Master https://downloads.dcos.io/dcos/testing/master/dcos_generate_config.sh
Latest Build of Specific PR https://downloads.dcos.io/dcos/testing/pull/<github-pr-number>/dcos_generate_config.sh

Development Environment

Linux is required for building and testing DC/OS.

  1. Linux distribution:
    • Docker doesn't have all the features needed on OS X or Windows
    • tar needs to be GNU tar for the set of flags used
    • unzip needs to be installed
  2. pre-commit
  3. tox
  4. git 1.8.5+
  5. Docker 1.11+
    • Install Instructions for various distributions. Docker needs to be configured so your user can run docker containers. The command docker run alpine /bin/echo 'Hello, World!' when run at a new terminal as your user should just print "Hello, World!". If it says something like "Unable to find image 'alpine:latest' locally" then re-run and the message should go away.
  6. Python 3.6
    • Arch Linux: sudo pacman -S python
    • Fedora 23 Workstation: Already installed by default / no steps
    • Ubuntu 16.04 LTS:
      • pyenv-installer
      • Python dependencies: sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils liblzma-dev python3-venv
      • Install Python 3.6.3: pyenv install 3.6.3
      • Create DC/OS virtualenv: pyenv virtualenv 3.6.3 dcos
      • Activate environment: pyenv activate dcos
  7. Over 10GB of free disk space and 8GB of RAM
    • The build makes use of hard links, so if you're using VirtualBox the disk space cannot be a synced folder.
  8. Optional pxz (speeds up package and bootstrap compression)
    • ArchLinux: pxz-git in the AUR. The pxz package corrupts tarballs fairly frequently.
    • Fedora 23: sudo dnf install pxz

Unit Tests

Unit tests can be run locally but require the development environment specified above.

tox

Tox is used to run the codebase unit tests, as well as coding standard checks. The config is in tox.ini.

Integration Tests

Integration tests can be run on any deployed DC/OS cluster. For installation instructions, see https://dcos.io/install/.

Integration tests are installed via the dcos-integration-test Pkgpanda package.

Integration test files are stored on the DC/OS master node at /opt/mesosphere/active/dcos-integration-test. Therefore, in order to test changes to test files, move files from packages/dcos-integration-test/extra/ in your checkout to /opt/mesosphere/active/dcos-integration-test on the master node.

The canonical source of the test suite's results is the continuous integration system. There may be differences between the results of running the integration tests as described in this document and the results given by the continuous integration system. In particular, some tests may pass on the continuous integration system and fail locally or vice versa.

Minimum Requirements

  • 1 master node
  • 2 private agent nodes
  • 1 public agent node
  • Task resource allocation is currently insignificantly small
  • DC/OS itself requires at least 2 (virtual) cpu cores on each node

Instructions

  1. SSH into a master node The tests can be run via Pytest while SSH'd as root into a master node of the cluster to be tested.

  2. Switch to root

    sudo su -
    
  3. Add the test user

    dcos-shell python /opt/mesosphere/bin/dcos_add_user.py [email protected]
    

    Running the above mentioned command will result in an output

    User [email protected] successfully added
    

    This test user has a known login token with far future expiration. DO NOT USE IN PRODUCTION. After the test, remember to delete the test user.

    For more information, see User Management.

  4. Run the tests using pytest in the cluster.

    cd /opt/mesosphere/active/dcos-integration-test
    dcos-shell pytest
    

Using a Docker Cluster with miniDC/OS

One way to run the integration tests is to use the miniDC/OS CLI.

This lets you create, run and manage clusters in test environments. Each DC/OS node is represented by a Docker container.

  1. Setup DC/OS in containers using the miniDC/OS CLI.

For example, after installing the miniDC/OS CLI, create a cluster:

minidcos docker download-installer
minidcos docker create /tmp/dcos_generate_config.sh \
    --masters 1 \
    --agents 2 \
    --public-agents 1 \
    --cluster-id default
  1. Run minidcos docker wait

Wait for DC/OS to start. Running wait command allows to make sure that the cluster is set up properly before any other actions that could otherwise cause errors in pytest command in the next step.

  1. Run pytest on a master node.

For example:

minidcos docker run --test-env pytest
  1. Destroy the cluster.
minidcos docker destroy

End-to-end Tests

E2E tests start a cluster as part of the test. These are useful for testing specific configurations or performing more disruptive tests.

To run the e2e tests, download a DC/OS installer, create a Python virtualenv, and run:

cd test-e2e
pip install -r requirements.txt
export DCOS_E2E_GENCONF_PATH=${PWD}/dcos_generate_config.sh
export DCOS_E2E_TMP_DIR_PATH=/tmp
export DCOS_E2E_LOG_DIR=/tmp/logs
pytest

Tests are annotated to be skipped if specific files are unchanged. This only applies to non-train Pull Requests run by D2iQ CI. In other cases, including running locally, all tests will run. You can use pytest arguments to restrict tests to a specific subset.

Build

DC/OS can be built locally but requires the development environment specified above.

DC/OS builds are packaged as a self-extracting Docker image wrapped in a bash script called dcos_generate_config.sh.

WARNING: Building a release from scratch the first time on a modern dev machine (4 cores / 8 hyper threads, SSD, reasonable internet bandwidth) takes about 1 hour.

Instructions

./build_local.sh

That will run a simple local build, and output the resulting DC/OS installers to ./packages/cache/dcos_generate_config.sh:

$ ./packages/cache/dcos_generate_config.sh

See the section on running in Docker to test the installer.

Build Details

If you look inside of the bash script build_local.sh there are the commands with descriptions of each.

The general flow is to:

  1. Check the environment is reasonable
  2. Write a release tool configuration if one doesn't exist
  3. Setup a python virtualenv where we can install the DC/OS python tools to in order to run them
  4. Install the DC/OS python tools to the virtualenv
  5. Build the release using the release tool

These steps can all be done by hand and customized / tweaked like standard python projects. You can hand create a virtualenvironment, and then do an editable pip install (pip install -e) to have a "live" working environment (as you change code you can run the tool and see the results).

Release Tool Configuration

This release tool always loads the config in dcos-release.config.yaml in the current directory.

The config is YAML. Inside it has two main sections. storage which contains a dictionary of different storage providers which the built artifacts should be sent to, and options which sets general DC/OS build configuration options.

Config values can either be specified directly, or you may use $ prefixed environment variables (the env variable must set the whole value).

Storage Providers

All the available storage providers are in release/storage. The configuration is a dictionary of a reference name for the storage provider (local, aws, my_azure), to the configuration.

Each storage provider (ex: aws.py) is an available kind prefix. The dictionary factories defines the suffix for a particular kind. For instance kind: aws_s3 would map to the S3StorageProvider.

The configuration options for a storage provider are the storage provider's constructor parameters.

Sample config storage that will save to my home directory (/home/cmaloney):

storage:
  local:
    kind: local_path
    path: /home/cmaloney/dcos-artifacts

Sample config that will store to a local archive path as well as AWS S3. To authenticate with AWS S3, reference the boto3 docs to learn how to configure access.

storage:
  aws:
    kind: aws_s3
    bucket: downloads.dcos.io
    object_prefix: dcos
    download_url: https://downloads.dcos.io/dcos/
  local:
    kind: local_path
    path: /mnt/big_artifact_store/dcos/

Repo Structure

DC/OS itself is composed of many individual components precisely configured to work together in concert.

This repo contains the release and package building tools necessary to produce installers for various on-premises and cloud platforms.

Directory Contents
cloud_images Base OS image building tools
config Release configuration
docs Documentation
flake8_dcos_lint Flake8 plugin for testing code quality
dcos_installer Backend for Web, SSH, and some bits of the Advanced installer. Code is being cleaned up
gen Python library for rendering yaml config files for various platforms into packages, with utilities to do things like make "late binding" config set by CloudFormation
packages Packages which make up DC/OS (Mesos, Marathon, AdminRouter, etc). These packages are built by pkgpanda, and combined into a "bootstrap" tarball for deployment.
pkgpanda DC/OS baseline/host package management system. Tools for building, deploying, upgrading, and bundling packages together which live on the root filesystem of a machine / underneath Mesos.
release Release tools for DC/OS. (Building releases, building installers for releases, promoting between channels)
ssh AsyncIO based parallel ssh library used by the installer
test_util various scripts, utilities to help with integration testing

Pull Requests Statuses

Pull requests automatically trigger a new DC/OS build and run several tests. These are the details on the various status checks against a DC/OS Pull Request.

Status Check Purpose Source and Dependencies
continuous-integration/jenkins/pr-head Admin Router Endpoint tests dcos/dcos/packages/adminrouter/extra/src/test-harness Docker Dependency: dcos/dcos/packages/adminrouter
mergebot/enterprise/build-status/aggregate EE Test Enforcement Private mesosphere/dcos-enterprise repo is tested against the SHA.
mergebot/enterprise/has_ship-it Code Review Enforcement Private Mergebot service in prod cluster
mergebot/enterprise/review/approved/min_2 Code Review Enforcement Mergebot service in prod cluster
mergebot/has_ship-it Code Review Enforcement Mergebot service in prod cluster
mergebot/review/approved/min_2 Code Review Enforcement Mergebot service in prod cluster
teamcity/dcos/build/dcos Builds DCOS Image (dcos_generate_config.sh) gen/build_deploy/bash.py
teamcity/dcos/build/tox Runs check-style, unit-tests tox.ini
teamcity/dcos/test/aws/cloudformation/simple Deployment using single-master-cloudformation.json and runs integration tests gen/build_deploy/aws.py,
teamcity/dcos/test/terraform/aws/onprem/static/group{1..n} Installation via dcos_generation_config.sh and runs Integration Tests gen/build_deploy/bash.py,
teamcity/dcos/test/test-e2e/group{1..n} End to End Tests. Each Test launches a cluster, exercises a functionality. test-e2e

Required vs Non-Required Status checks

A PR status check may be marked as Required or Not-Required (Default). The required status checks are necessary for applying a ship-it label, which makes the PR eligible for merge. A non-required status check is completely informational, and the success or the failure of the status check does not, in any way, impact the merge of the PR.

The required status checks are encoded in the repo's megebot-config (For .e.g: https://github.com/dcos/dcos/blob/master/mergebot-config.json#L38) and are enforced by mergebot.

dcos-core-cli's People

Contributors

abhay-agarwal avatar armandgrillet avatar bamarni avatar br-lewis avatar cmaloney avatar connordoyle avatar cruhland avatar dependabot-preview[bot] avatar grampelberg avatar janisz avatar joel-hamill avatar jsancio avatar jsrodman avatar kensipe avatar klueska avatar lloesche avatar makkes avatar meichstedt avatar mgummelt avatar mnaboka avatar msabramo avatar nickbp avatar philipnrmn avatar rgo3 avatar sschneid avatar ssk2 avatar swartzrock avatar takirala avatar unterstein avatar yuratolochkevich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcos-core-cli's Issues

dcos job list displays only N/A as Last Successful Run

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

If DC/OS CLI version < 0.4.5, DC/OS version can be found at http://dcos_url/dcos-metada/dcos-version.json

dcoscli.version=0.4.16
dcos.version=1.9.0
dcos.commit=0ce03387884523f02624d3fb56c7fbe2e06e181b
dcos.bootstrap-id=58fd0833ce81b6244fc73bf65b5deb43217b0bd7

What operating system and version are you using?

OSX 10.12

What did you do?

If possible please provide a recipe for reproducing.

dcos job list
ID             DESCRIPTION  STATUS       LAST SUCCESFUL RUN
for-loop                    Unscheduled         N/A
forloop2                    Unscheduled         N/A
sleep600-2cpu               Unscheduled         N/A
sleep600-cpu9               Unscheduled         N/A

What did you expect to see?

http://picpaste.com/pics/Screen_Shot_2017-05-15_at_10.07.35_PM-MpY4vCSO.1494900492.png

LAST SUCCESSFUL RUN should be set for two jobs

What did you see instead?

see above

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/dcos/[email protected]: reading github.com/dcos/dcos-cli/go.mod at revision v1.2.0: unknown revision v1.2.0

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/dcos/[email protected]: reading github.com/dcos/dcos-cli/go.mod at revision v1.2.0: unknown revision v1.2.0

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dcos Node SSH is not working

I am using following DCOS version:
dcoscli.version=0.4.15
dcos.version=1.8.8
dcos.commit=602edc1b4da9364297d166d4857fc8ed7b0b65ca
dcos.bootstrap-id=5df43052907c021eeb5de145419a3da1898c58a5

Operating System:
CentOS Linux release 7.2.1511 (Core)

I have installed the dcos using Advanced Custom Installation Method with following config.yaml
cluster_name: ***
oauth_enabled: true
resolvers:

  • 8.8.8.8
  • 8.8.4.4
    oauth_issuer_url: ***
    oauth_auth_redirector: ***
    master_discovery: master_http_loadbalancer
    use_proxy: 'false'
    exhibitor_storage_backend: aws_s3
    s3_bucket: ***
    ip_detect_filename: /genconf/ip-detect
    s3_prefix: ***
    exhibitor_address: ***
    oauth_auth_host: ***
    aws_region: us-west-1
    bootstrap_url: ***
    num_masters: 3
    exhibitor_explicit_keys: false
    rexray_config:
    rexray:
    volume:
    unmount:
    ignoreusedcount: true
    storageDrivers:
    • ec2
      loglevel: warn
      modules:
      default-admin:
      host: tcp://127.0.0.1:61003
      default-docker:
      disabled: true
      oauth_client_id: ***
      check_time: 'true'

After configuring cli for this cluster, i tried to run
dcos node ssh --master-proxy --leader
Response : Running ssh -A -t [email protected] ssh -A -t [email protected]
As you can see, It is ssh on private Ip.

After some debugging, I have found that /metadata is called to find the ip of master proxy which in turn uses '/opt/mesosphere/bin/detect-ip-public'.

Content of the above file is same as the script of getting local-ip which i have supplied in genconf folder.
I have also tried adding ip_detect_public_filename: /genconf/ip-detect-public
but still getting the same result.

PS: I am using aws instances.

dcos package upgrade

Please add support for dcos package upgrade.

Example: I've just pushed a new version of the Spark package, and I'd like to upgrade. I currently have to do an "uninstall" followed by an "install", which is less than ideal, partially because it tears down any mesos framework the app might be running.

dcos service log requires ssh credentials

Please answer the following questions before submitting your issue. Thanks!

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

If DC/OS CLI version < 0.4.5, DC/OS version can be found at `http://dcos_url/dcos-metada/dcos-version.json

root@swarm-master02:/# dcos --version
dcoscli.version=0.4.8
dcos.version=1.7-open
dcos.commit=14509fe1e7899f439527fb39867194c7a425c771
dcos.bootstrap-id=3a2b7e03c45cd615da8dfb1b103943894652cd71

What operating system and version are you using?

root@swarm-master02:/# cat /etc/debian_version
7.11

root@swarm-master02:/# python -V
Python 3.4.5

root@swarm-master02:/# pip -V
pip 8.1.2 from /usr/local/lib/python3.4/site-packages (python 3.4)

What did you do?

If possible please provide a recipe for reproducing.

  1. installed the dcos cli
  2. ran 'dcos auth login' --- result was correct
  3. ran 'dcos service' --- result was correct
  4. ran 'dcos service log marathon' --- stuck here asking for password

root@swarm-master02:/# dcos service log marathon
Running ssh [email protected] journalctl -n 10 -u dcos-marathon
Password:

What did you expect to see?

The dcos cli node is in the same network as the dcos cluster, according to the manual, I should see the logs.

What did you see instead?

Asking for ssh password

Integration tests should execute on an isolated CLI installation

When running the integration tests, I noticed that some of them use the standard config directory (~/.dcos) because I had failures due to my configuration. For example, I had the kafka subcommand installed, and that resulted in the test for the "top level" menu output failing.

The integration tests should always use a CLI that has been installed into a temporary directory, and configured to use generated, test-specific resources. That would prevent unwanted interactions between the tests and any actual CLI installations on developer machines.

task ls --completed --json missing TASK_FAILED tasks

nick@augustao:~$ dcos task ls --completed --json
[]

nick@augustao:~$ dcos --version
dcoscli.version=0.4.12
dcos.version=1.8-dev
dcos.commit=02e6c655efdafca6f3336d25f7e5344bf35f6ca6
dcos.bootstrap-id=c8b4c4578211a1608391b53ab0a30a5b044215aa

Meanwhile state.json contains many tasks like this in a TASK_FAILED state:

{
    "id": "exiter.b7b4ed4a-80f1-11e6-ab75-225d308e1d52",
    "name": "exiter",
    "framework_id": "38300900-14bd-49f5-a8d1-06d3a9473ed9-0000",
    "executor_id": "",
    "slave_id": "38300900-14bd-49f5-a8d1-06d3a9473ed9-S0",
    "state": "TASK_FAILED",
    "resources": {
        "disk": 0.0,
        "mem": 32.0,
        "gpus": 0.0,
        "cpus": 0.1,
        "ports": "[7250-7250]"
    },
    "statuses": [{
        "state": "TASK_RUNNING",
        "timestamp": 1474568634.36154,
        "container_status": {
            "network_infos": [{
                "ip_addresses": [{
                    "ip_address": "10.0.1.203"
                }]
            }]
        }
    }, {
        "state": "TASK_FAILED",
        "timestamp": 1474568639.57595,
        "container_status": {
            "network_infos": [{
                "ip_addresses": [{
                    "ip_address": "10.0.1.203"
                }]
            }]
        }
    }],
    "labels": [{
        "key": "DCOS_SPACE",
        "value": "\/exiter"
    }],
    "discovery": {
        "visibility": "FRAMEWORK",
        "name": "exiter",
        "ports": {
            "ports": [{
                "number": 7250,
                "protocol": "tcp"
            }]
        }
    }
}, [...]

dcos package describe <package> --config --short

Please answer the following questions before submitting your issue. Thanks!

What version of the DCOS CLI are you using (dcos --version)?

0.4.3

What version of DCOS are you using?

testing/continuous

What operating system and version are you using?

ubuntu 15.04

What did you do?

If possible please provide a recipe for reproducing.

dcos package describe <package> --config

What did you expect to see?

I'd like to have a --short option that allows me to see something like:

brokers.count=<default>
brokers.cpu
...

What did you see instead?

json

different ssh options for --master-proxy

Please answer the following questions before submitting your issue. Thanks!

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

dcoscli.version=0.6.1
dcos.version=1.11.0

What operating system and version are you using?

linux

What did you do?

dcos node ssh --private-ip someip --master-proxy --option "someoption"

What did you expect to see?

I expected the ssh option to be only applied to the master-proxy ssh call and not the subsequent internal call.

What did you see instead?

The ssh option was also applied to the internal ssh call, which then failed.

Add a `marathon app save` and `marathon app load`

save would save a marathon.json to disk, which could then be used with load to put it back into the cluster (HTTP PUT rather than POST since Marathon has different behavior on PUT). Currently I can sort of hack this together with bash around dcos marathon app show and dcos marathon app add, but it isn't very clean and doesn't always work.

Ideally there would be a marathon group version of these around, and if I passed it the group / it would save all apps.

Add a `dcos package install --interactive` option

When I'm using the Web UI I get a nice Form for filling in all of a package's available options.
However when using the CLI I have to manually write a JSON and provide it using the --options arg. I'd like for there to be an --interactive arg that will interactively go through the list of options with me. With an optional --dump-json arg that will then dump the generated JSON file either to stdout or to a specified file. And a --dry-run that will not actually install the package and only generate the options JSON.

Examples

# Install a package in interactive mode
$ dcos package install mysql --interactive

# Install a package in interactive mode and dump the generated JSON to stdout
$ dcos package install mysql --interactive --dump-json

# Install a package in interactive mode and dump the generated JSON to /tmp/options.json
$ dcos package install mysql --interactive --dump-json=/tmp/options.json

# Generate a package's config in interactive mode, dump the generated JSON to stdout but don't actually install the package
$ dcos package install mysql --interactive --dump-json --dry-run

marathon validation for updates

Please answer the following questions before submitting your issue. Thanks!

What version of DCOS + DCOS CLI are you using (dcos --version)?

If DCOS CLI version < 0.4.5, DCOS version can be found at http://dcos_url/dcos-metada/dcos-version.json
dcos cli 0.4.5

What operating system and version are you using?

osx

What did you do?

If possible please provide a recipe for reproducing.

  1. Add a marathon app
  2. Update marathon app with invalid property `dcos marathon app update incorrectSpelling=3

What did you expect to see?

Error when passing invalid marathon properties

What did you see instead?

Success.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/dcos/[email protected]: reading github.com/dcos/dcos-cli/go.mod at revision v1.2.0: unknown revision v1.2.0

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/dcos/[email protected]: reading github.com/dcos/dcos-cli/go.mod at revision v1.1.3: unknown revision v1.1.3

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

dcos job kill: Attribute error in normalize_marathon_id_path

Please answer the following questions before submitting your issue. Thanks!

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

C:\Users\niroy>dcos --version
dcoscli.version=0.5.7
dcos.version=1.9.0
dcos.commit=0ce03387884523f02624d3fb56c7fbe2e06e181b
dcos.bootstrap-id=58fd0833ce81b6244fc73bf65b5deb43217b0bd7

What operating system and version are you using?

Windows 10 build 1703

What did you do?

I create a simple job and schedule, let it run then tried to kill the job.

dcos job show sleep2
{
  "id": "sleep2",
  "labels": {},
  "run": {
    "artifacts": [],
    "cmd": "echo \"Hello world\"\ndate\nsleep 1000\necho \"Bye\"\n",
    "cpus": 0.01,
    "disk": 0,
    "env": {},
    "maxLaunchDelay": 3600,
    "mem": 32,
    "placement": {
      "constraints": []
    },
    "restart": {
      "policy": "NEVER"
    },
    "volumes": []
  }
}

dcos job schedule show sleep2 --json
[
  {
    "concurrencyPolicy": "ALLOW",
    "cron": "*/5 * * * *",
    "enabled": true,
    "id": "default",
    "nextRunAt": "2018-01-26T23:10:00.000+0000",
    "startingDeadlineSeconds": 900,
    "timezone": "UTC"
  }
]

What did you expect to see?

Job gets killed

What did you see instead?

dcos job kill sleep2
Traceback (most recent call last):
  File "dcoscli\subcommand.py", line 103, in run_and_capture
  File "dcoscli\job\main.py", line 40, in main
  File "dcoscli\util.py", line 24, in wrapper
  File "dcoscli\job\main.py", line 61, in _main
  File "dcos\cmds.py", line 43, in execute
  File "dcoscli\job\main.py", line 247, in _kill
  File "dcos\metronome.py", line 343, in kill_run
  File "dcos\util.py", line 730, in normalize_marathon_id_path
AttributeError: 'NoneType' object has no attribute 'strip'

make env failed

Although python 2.7 and python 3.6 exist on the system, the make env fails with the following error

$ pwd
/home/mahmood/dcos-cli/python/lib/dcos
$ make env
Checking prerequisites...
Cannot find python. Exiting...
Makefile:11: recipe for target 'env' failed
make: *** [env] Error 1
$ python
Python 2.7.14 (default, Sep 23 2017, 22:06:14) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> 
$ python3.6
Python 3.6.3 (default, Oct  3 2017, 21:45:48) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ 

Accept stdin for options file content on "dcos package install"

There's been a couple scenarios where it'd be nice if 'package install' with custom configuration could be done in a single line, without requiring a json file on disk:

  • Framework tests need to jump through hoops whenever installing the framework:
    1. create a temp file
    2. run 'dcos package install --options=tempfile'
    3. remove the temp file (occasionally end up with leftover temp files lying around if test is aborted)
  • Examples in READMEs need to give multiple steps, eg "write this data to a file, THEN run dcos package install against the file you just created". As with the test scenario, users end up with misc json files to be cleaned up.

there must be a better way!


Please answer the following questions before submitting your issue. Thanks!

What version of the DCOS CLI are you using (dcos --version)?

SNAPSHOT

What version of DCOS are you using?

testing/continuous

What operating system and version are you using?

Ubuntu 15.10

What did you do? If possible please provide a recipe for reproducing.

echo '{ "brokers": { "count": 3, "mem": 2048, "disk": 5000 } }' | dcos package install kafka

Alternates?:

  • echo '{ "brokers": { "count": 3, "mem": 2048, "disk": 5000 } }' | dcos package install kafka --
  • echo '{ "brokers": { "count": 3, "mem": 2048, "disk": 5000 } }' | dcos package install kafka --options
  • echo '{ "brokers": { "count": 3, "mem": 2048, "disk": 5000 } }' | dcos package install kafka --options=stdin

What did you expect to see?

Install Kafka using the provided json config sent to stdin

What did you see instead?

Install Kafka using default config

dcos package search without search term throws error

Please answer the following questions before submitting your issue. Thanks!

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

dcoscli.version=0.4.15
dcos.version=1.8.8

What operating system and version are you using?

Windows 10

What did you do?

If possible please provide a recipe for reproducing.

dcos package search

What did you expect to see?

No result or statement to the effect of "please enter search term".

What did you see instead?

Traceback (most recent call last):
File "dcoscli\subcommand.py", line 101, in run_and_capture
File "dcoscli\package\main.py", line 22, in main
File "dcoscli\util.py", line 22, in wrapper
File "dcoscli\package\main.py", line 36, in _main
File "dcos\cmds.py", line 43, in execute
File "dcoscli\package\main.py", line 471, in _search
File "dcos\emitting.py", line 118, in publish_table
File "dcos\emitting.py", line 59, in publish
File "dcos\emitting.py", line 76, in print_handler
File "dcos\emitting.py", line 157, in _page
File "c:\python35\lib\encodings\cp850.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u2019' in position 10400: character maps to

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/dcos/[email protected]: reading github.com/dcos/dcos-cli/go.mod at revision v1.2.0: unknown revision v1.2.0

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

"dcos task --completed" fails if agents were removed from the cluster

What version of DC/OS + DC/OS CLI are you using (dcos --version)?

dcoscli.version=0.4.15
dcos.version=1.9.0
dcos.commit=0ce03387884523f02624d3fb56c7fbe2e06e181b
dcos.bootstrap-id=58fd0833ce81b6244fc73bf65b5deb43217b0bd

What operating system and version are you using?

CoreOS

What did you do?

Created a DCOS cluster on AWS using CloudFormation. Killed agent nodes, new agent nodes were started by ASG which came up as different nodes.

When I run "dcos task --completed" it seems to be querying for the failed nodes.

What did you expect to see?

List of completed tasks from nodes that are up.

What did you see instead?

$ dcos task --completed
No slave found with ID "01d86b9c-ca2c-4c3c-9d9f-d3a3ef3e3911-S2".

$ dcos node
HOSTNAME IP ID
10.0.0.135 10.0.0.135 5c6438b2-1f63-4c23-b62a-ad0a7d354a91-S3
10.0.0.179 10.0.0.179 5c6438b2-1f63-4c23-b62a-ad0a7d354a91-S6
10.0.1.167 10.0.1.167 01d86b9c-ca2c-4c3c-9d9f-d3a3ef3e3911-S4
10.0.1.210 10.0.1.210 5c6438b2-1f63-4c23-b62a-ad0a7d354a91-S7
10.0.1.221 10.0.1.221 5c6438b2-1f63-4c23-b62a-ad0a7d354a91-S8
10.0.6.234 10.0.6.234 01d86b9c-ca2c-4c3c-9d9f-d3a3ef3e3911-S5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.