How to set up autopilot in snappy Ubuntu core

Source: Internet
Author: User
Tags symlink

In snappy Ubuntu core, Autoupilot is a feature of it. As long as the autopilot feature is on, and our snappy device is networked, it can automatically connect and update our snappy Ubuntu Core. This autopilot switch is on by default. We can set it up by Snappy Config.


We can view its current settings with the following command: Method 1

(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep autopilot
    autopilot:true

We can see that its current switch is on, which means that our snappy system will automatically update our system in the case of networking.

(AMD64) ubuntu@localhost:~$ sudo systemctl stop Snappy-autopilot.timer
(AMD64) ubuntu@localhost:~$ sudo systemctl Disable Snappy-autopilot.timer
removed symlink/etc/systemd/system/multi-user.target.wants/ Snappy-autopilot.timer.
(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep AutoUpdate
(AMD64) ubuntu@localhost:~$ snappy Config Ubuntu-core | grep autopilot
    autopilot:false

If we just want to turn it off temporarily, we can use stop instead of the Disable.

We can re-open this switch in the following way:

(AMD64) ubuntu@localhost:~$ sudo systemctl enable Snappy-autopilot.timer
Created symlink from/etc/systemd/system/ Multi-user.target.wants/snappy-autopilot.timer To/lib/systemd/system/snappy-autopilot.timer.
(AMD64) ubuntu@localhost:~$ sudo systemctl start Snappy-autopilot.timer
(AMD64) ubuntu@localhost:~$ Snappy Config Ubuntu-core | grep autopilot
    autopilot:true

Please see the article "Autopilot mode" for more information. Method 2

Another approach is to use the following approach:

$ snappy Config Ubuntu-core > My.yaml

We then modify the "autopilot" entry to the value we want, and then enter the following command:

$ sudo snappy config Ubuntu-core my.yaml

Method 3
$ Echo ' config: {ubuntu-core: {autopilot:off}} ' | sudo snappy config Ubuntu-core-

The above command will turn off autopilot
$  echo ' config: {ubuntu-core: {autopilot:on}} ' | sudo snappy config ubuntu-core-

The above command will open the autopilot switch

We can check the current state by the following method:

$ snappy Config Ubuntu-core | grep autopilot






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.